Skip to content
This repository was archived by the owner on Sep 3, 2021. It is now read-only.

Commit d7a45bf

Browse files
committed
Merge branch 'master' of github.com:neo4j-graphql/neo4j-graphql-js
2 parents ae1751a + e2825f9 commit d7a45bf

File tree

15 files changed

+3459
-53
lines changed

15 files changed

+3459
-53
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"build-with-sourcemaps": "babel src --presets @babel/preset-env --out-dir dist --source-maps",
1717
"precommit": "lint-staged",
1818
"prepare": "npm run build",
19-
"test": "nyc --reporter=lcov ava test/unit/augmentSchemaTest.test.js test/unit/configTest.test.js test/unit/assertSchema.test.js test/unit/cypherTest.test.js test/unit/filterTest.test.js test/unit/filterTests.test.js test/unit/experimental/augmentSchemaTest.test.js test/unit/experimental/cypherTest.test.js",
19+
"test": "nyc --reporter=lcov ava test/unit/augmentSchemaTest.test.js test/unit/configTest.test.js test/unit/assertSchema.test.js test/unit/cypherTest.test.js test/unit/filterTest.test.js test/unit/filterTests.test.js test/unit/custom/cypherTest.test.js test/unit/experimental/augmentSchemaTest.test.js test/unit/experimental/cypherTest.test.js test/unit/experimental/custom/cypherTest.test.js",
2020
"parse-tck": "babel-node test/helpers/tck/parseTck.js",
2121
"test-tck": "nyc ava --fail-fast test/unit/filterTests.test.js",
2222
"report-coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",

src/augment/augment.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
import { augmentDirectiveDefinitions } from './directives';
1919
import { extractResolversFromSchema, augmentResolvers } from './resolvers';
2020
import { addAuthDirectiveImplementations } from '../auth';
21+
import _ from 'lodash';
2122

2223
/**
2324
* The main export for augmenting an SDL document
@@ -40,7 +41,7 @@ export const makeAugmentedExecutableSchema = ({
4041
let definitions = [];
4142
if (isParsedTypeDefs) {
4243
// Print if we recieved parsed type definitions in a GraphQL Document
43-
definitions = typeDefs.definitions;
44+
definitions = _.cloneDeep(typeDefs.definitions);
4445
} else {
4546
// Otherwise parse the SDL and get its definitions
4647
definitions = parse(typeDefs).definitions;

src/augment/directives.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,10 @@ const directiveDefinitionBuilderMap = {
315315
}
316316
}
317317
],
318-
locations: [DirectiveLocation.FIELD_DEFINITION]
318+
locations: [
319+
DirectiveLocation.FIELD_DEFINITION,
320+
DirectiveLocation.INPUT_FIELD_DEFINITION
321+
]
319322
};
320323
},
321324
[DirectiveDefinition.RELATION]: ({ config }) => {

0 commit comments

Comments
 (0)