Socket
Socket
Sign inDemoInstall

apollo-codegen

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-codegen - npm Package Compare versions

Comparing version 0.16.3 to 0.16.4

2

lib/loading.js

@@ -18,3 +18,3 @@ "use strict";

function extractDocumentFromJavascript(content, tagName = 'gql') {
const re = new RegExp(tagName + '`([^`]*)`', 'g');
const re = new RegExp(tagName + '\\s*`([^`]*)`', 'g');
let match;

@@ -21,0 +21,0 @@ const matches = [];

@@ -261,3 +261,3 @@ "use strict";

function propertyDeclarationForField(generator, field) {
const { kind, propertyName, typeName, type, isConditional, description } = naming_1.propertyFromField(generator.context, field);
const { kind, propertyName, typeName, type, isConditional, description, isDeprecated, deprecationReason } = naming_1.propertyFromField(generator.context, field);
const responseName = field.responseName;

@@ -267,2 +267,3 @@ const namedType = graphql_1.getNamedType(type);

language_1.comment(generator, description);
language_1.deprecation(generator, isDeprecated, deprecationReason);
generator.printOnNewline(`public var ${propertyName}: ${typeName}`);

@@ -431,2 +432,3 @@ generator.withinBlock(() => {

language_1.comment(generator, value.description);
language_1.deprecation(generator, value.isDeprecated, value.deprecationReason);
generator.printOnNewline(`case ${language_1.escapeIdentifierIfNeeded(naming_1.enumCaseName(value.name))} = "${value.value}"`);

@@ -433,0 +435,0 @@ });

@@ -11,2 +11,9 @@ "use strict";

exports.comment = comment;
function deprecation(generator, isDeprecated, deprecationReason) {
if (isDeprecated !== undefined && isDeprecated) {
deprecationReason = (deprecationReason !== undefined && deprecationReason.length > 0) ? deprecationReason : "";
generator.printOnNewline(`@available(*, deprecated, message: "${deprecationReason}")`);
}
}
exports.deprecation = deprecation;
function namespaceDeclaration(generator, namespace, closure) {

@@ -13,0 +20,0 @@ if (namespace) {

{
"name": "apollo-codegen",
"version": "0.16.3",
"version": "0.16.4",
"description": "Generate API code or type annotations based on a GraphQL schema and query documents",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc