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.9.5 to 0.9.6

2

lib/swift/codeGeneration.js

@@ -533,3 +533,3 @@ 'use strict';

return '"' + propertyName + '": ' + propertyName;
}), ', '), ']'));
}), ', ') || ':', ']'));
});

@@ -536,0 +536,0 @@ });

{
"name": "apollo-codegen",
"version": "0.9.5",
"version": "0.9.6",
"description": "Generate client code based on a GraphQL schema and query documents",

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

@@ -12,3 +12,4 @@ import { expect } from 'chai';

GraphQLList,
GraphQLNonNull
GraphQLNonNull,
GraphQLInputObjectType
} from 'graphql';

@@ -847,3 +848,30 @@

});
it('should generate a valid struct declaration for a GraphQLInputObjectType with only optional fields', function() {
const generator = new CodeGenerator();
const inputType = new GraphQLInputObjectType({
name: 'OnlyOptionalFieldsInput',
fields: {
optionalString: { type: GraphQLString },
}
});
typeDeclarationForGraphQLType(generator, inputType);
expect(generator.output).to.equal(stripIndent`
public struct OnlyOptionalFieldsInput: GraphQLMapConvertible {
public var graphQLMap: GraphQLMap
public init() {
graphQLMap = [:]
}
public init(optionalString: String?) {
graphQLMap = ["optionalString": optionalString]
}
}
`);
});
});
});

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