neo4j-graphql-js
neo4j-graphql-js copied to clipboard
Allow ASTs in extractTypeMapFromTypeDefs
This lets you use preprocessed ASTs from stuff like apollographql/graphql-tag with this library. Eg:
import schemaGql from './schema.gql';
// or...
const schemaGql = gql` ... `;
const schema = makeExecutableSchema({
typeDefs: augmentTypeDefs(schemaGql),
resolvers,
});
const neoAugmentedSchema = augmentSchema(schema);
const apolloServer = new ApolloServer({
schema: neoAugmentedSchema
// ...
This required moving graphql to peerDependencies so that this package can use the graphql version provided by consumers of this package. Otherwise, this line in graphql-js causes problems due to Source technically being a different type.
Also:
- Bump version to
2.4.0 - Update
nycto address vuln identified bynpm audit
Thanks @stith for the PR!
Moving graphql.js to a peer dependency would be a breaking change for this library so we'd need to save this for the 3.x release cycle (which will probably be March timeframe). Is there a way to implement this that wouldn't require moving graphql.js to a peer dependency? (For example, does upgrading to graphql.js. v14.1.1 fix the error you mentioned?)
https://github.com/neo4j-graphql/neo4j-graphql-js/issues/608