Socket
Socket
Sign inDemoInstall

merge-graphql-schemas

Package Overview
Dependencies
Maintainers
2
Versions
269
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

merge-graphql-schemas - npm Package Compare versions

Comparing version 0.0.20 to 0.0.21

package-lock.json

7

CHANGELOG.md

@@ -9,2 +9,9 @@ # Change Log

## [0.0.21] - 2017-06-18
### Fixed
- Ast printer bug fix
### Changed
- Updated graphql-tools to version 1.0.0
## [0.0.20] - 2017-06-18

@@ -11,0 +18,0 @@ ### Changed

6

dist/merge_types.js

@@ -33,4 +33,5 @@ 'use strict';

const _isMergeableTypeDefinition = def => (0, _astHelpers.isObjectTypeDefinition)(def) && _makeSchema.mergeableTypes.includes(def.name.value);
const _isMergeableTypeDefinition = def => (0, _astHelpers.isObjectTypeDefinition)(def) && _makeSchema.mergeableTypes.includes(def.name.value); // Test
const _isNonMergeableTypeDefinition = def => !_isMergeableTypeDefinition(def);

@@ -43,3 +44,2 @@

const description = (0, _buildASTSchema.getDescription)(node);
if (description) {

@@ -110,5 +110,5 @@ return [_makeCommentNode(description), node];

return [schema].concat((0, _toConsumableArray3.default)(rest));
return [schema].concat((0, _toConsumableArray3.default)(rest)).join('\n');
};
exports.default = mergeTypes;

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

Comment: ({ value }) => `# ${value}`
Comment: ({ value }) => `# ${value.replace('\n', '\n # ')}`
};

@@ -127,0 +127,0 @@

{
"name": "merge-graphql-schemas",
"author": "OK GROW!",
"version": "0.0.20",
"version": "0.0.21",
"description": "Better organize your GraphQL server.",

@@ -52,4 +52,4 @@ "repository": {

"graphql-tag": "^2.2.0",
"graphql-tools": "^0.11.0"
"graphql-tools": "^1.0.0"
}
}

@@ -0,1 +1,2 @@

// Test
import { parse } from 'graphql';

@@ -18,3 +19,2 @@ import { getDescription } from 'graphql/utilities/buildASTSchema';

const description = getDescription(node);
if (description) {

@@ -106,3 +106,3 @@ return [_makeCommentNode(description), node];

return [schema, ...rest];
return [schema, ...rest].join('\n');
};

@@ -109,0 +109,0 @@

@@ -184,3 +184,3 @@ /* eslint-disable */

Comment: ({ value }) => `# ${value}`
Comment: ({ value }) => `# ${value.replace('\n', '\n # ')}`,
};

@@ -187,0 +187,0 @@

@@ -22,2 +22,3 @@ export default `

# ClientID
# Required
id: ID!

@@ -24,0 +25,0 @@ # Name

@@ -22,3 +22,3 @@ import mergeTypes from '../src/merge_types';

`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -35,3 +35,3 @@ expect(schema).toContain(expectedSchemaType);

`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -48,3 +48,3 @@ expect(schema).not.toContain(expectedSchemaType);

`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -61,3 +61,3 @@ expect(schema).not.toContain(expectedSchemaType);

`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -77,3 +77,3 @@ expect(schema).not.toContain(expectedSchemaType);

`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -91,3 +91,3 @@ expect(schema).toContain(expectedSchemaType);

`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -104,3 +104,3 @@ expect(schema).toContain(expectedSchemaType);

`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -117,3 +117,3 @@ expect(schema).not.toContain(expectedSchemaType);

`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -135,3 +135,3 @@ expect(schema).not.toContain(expectedSchemaType);

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -149,3 +149,3 @@ expect(separateTypes).toContain(expectedCustomType);

`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -162,3 +162,3 @@ expect(schema).toContain(expectedSchemaType);

`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -175,3 +175,3 @@ expect(schema).not.toContain(expectedSchemaType);

`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -188,3 +188,3 @@ expect(schema).not.toContain(expectedSchemaType);

`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -205,3 +205,3 @@ expect(schema).not.toContain(expectedSchemaType);

`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -222,3 +222,3 @@ expect(schema).toContain(expectedSchemaType);

`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -238,3 +238,3 @@ expect(schema).toContain(expectedQueryType);

}`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -253,3 +253,3 @@ expect(schema).toContain(expectedMutationType);

}`);
const schema = normalizeWhitespace(mergedTypes[0]);
const schema = normalizeWhitespace(mergedTypes);

@@ -272,3 +272,3 @@ expect(schema).toContain(expectedSubscriptionType);

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -290,3 +290,3 @@ expect(separateTypes).toContain(expectedClientType);

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -305,3 +305,3 @@ expect(separateTypes).toContain(expectedProductType);

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -319,3 +319,3 @@ expect(separateTypes).toContain(expectedProductType);

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -335,3 +335,3 @@ expect(separateTypes).toContain(expectedProductType);

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -351,3 +351,3 @@ expect(separateTypes).toContain(expectedEnumType);

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -367,3 +367,3 @@ expect(separateTypes).toContain(expectedEnumType);

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -379,3 +379,3 @@ expect(separateTypes).toContain(expectedEnumType);

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -391,3 +391,3 @@ expect(separateTypes).toContain(expectedScalarType);

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -403,3 +403,3 @@ expect(separateTypes).toContain(expectedScalarType);

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -419,3 +419,3 @@ expect(separateTypes).toContain(expectedScalarType);

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -436,3 +436,3 @@ expect(separateTypes).toContain(expectedScalarType);

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -448,3 +448,3 @@ expect(separateTypes).toContain(expectedScalarType);

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -460,2 +460,3 @@ expect(separateTypes).toContain(expectedScalarType);

# ClientID
# Required
id: ID!

@@ -466,3 +467,3 @@ # Name

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -476,3 +477,4 @@ expect(separateTypes).toContain(expectedClientType);

const expectedClientType = normalizeWhitespace(`
# Comments on top of type definition Second comment line
# Comments on top of type definition
# Second comment line
type ClientWithCommentOnTop {

@@ -485,3 +487,3 @@ # ClientID

`);
const separateTypes = mergedTypes.slice(1).map(type => normalizeWhitespace(type));
const separateTypes = normalizeWhitespace(mergedTypes);

@@ -488,0 +490,0 @@ expect(separateTypes).toContain(expectedClientType);

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