Skip to content
New issue

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

Ability to merge AST schemas? #220

Closed
1 of 5 tasks
mgcrea opened this issue Oct 10, 2018 · 1 comment
Closed
1 of 5 tasks

Ability to merge AST schemas? #220

mgcrea opened this issue Oct 10, 2018 · 1 comment
Labels
feature New addition or enhancement to existing solutions

Comments

@mgcrea
Copy link

mgcrea commented Oct 10, 2018

Issue Labels

  • has-reproduction
  • feature
  • docs
  • blocking
  • good first issue

I'm looking for a way to merge ASTs of graphql schemas:

I'm using webpack on the server side with the following rule:

      {
        test: /\.(graphql)$/,
        loader: 'graphql-tag/loader'
      }

I tried to do:

import bookSchema from './book.graphql';
import authorSchema from './author.graphql';

export default mergeSchemas({
  schemas: [bookSchema, authorSchema]
});

But it does not work (expects actual executable schemas and not AST parsed code).

Is there a way to do it?

@ghost ghost added the feature New addition or enhancement to existing solutions label Oct 10, 2018
@jnwng
Copy link
Contributor

jnwng commented Mar 31, 2019

graphql-tag is designed for GraphQL queries, not GraphQL SDL. if you're looking to do schema merging / imports in SDL, i'd look at something like graphql-import

@jnwng jnwng closed this as completed Mar 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New addition or enhancement to existing solutions
Projects
None yet
Development

No branches or pull requests

2 participants