We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to pass a DocumentNode created by graphql-tag to the buildFederationSchema
DocumentNode
graphql-tag
buildFederationSchema
export declare const buildFederationSchema: ( schema: string | DocumentNode, opts?: buildFederationSchemaOptions ) => GraphQLSchema
Example
const gql = require('graphql-tag') const schema = gql` extend type Query { me: User } type User @key(fields: "id") { id: ID! name: String username: String } `
Why is this an important feature?
To integrate tools that help to organise the project
(Eg.)
const {loadFiles} = require('@graphql-tools/load-files') const schema = await loadFiles( path.resolve(__dirname, '../modules/**/*.graphql') ) const resolvers = (await loadFiles( path.resolve(__dirname, '../modules/**/resolvers.js') )).reduce((acc, resolver) => { Object.entries(resolver).forEach(([key, value]) => { if(!acc[key]) { acc[key] = {} } acc[key] = {...acc[key], ...value} }) return acc }, {})
Maybe all this automation can be added in a separated module to manage mercurius modules (https://github.com/mercurius-js/mercurius-modules)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Allow to pass a
DocumentNode
created bygraphql-tag
to thebuildFederationSchema
Example
Why is this an important feature?
To integrate tools that help to organise the project
(Eg.)
Maybe all this automation can be added in a separated module to manage mercurius modules (https://github.com/mercurius-js/mercurius-modules)
The text was updated successfully, but these errors were encountered: