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

Add support for interface extension #699

Closed
ckolderup opened this issue Mar 28, 2018 · 0 comments
Closed

Add support for interface extension #699

ckolderup opened this issue Mar 28, 2018 · 0 comments

Comments

@ckolderup
Copy link
Contributor

ckolderup commented Mar 28, 2018

graphql-js 0.13.1 added support for extend interface, but when merging schemas using graphql-tools, it seems that any definitions that start with those two words aren't included in the schema extensions and are thus ignored when doing something like merging schemas.

It would be extremely helpful to be able to extend an interface in the process of stitching schemas the same way you can extend a type. I can't produce a Launchpad link since it's still running graphql-js 0.12.x but here is the behavior I would expect vs what I'm getting:

original schema:

interface A {
  helloWorld: String
}

schema extension (with appropriate resolver code defined for object A):

extend interface A {
  goodnightMoon: String
}

EXPECTED: calling mergeSchemas with the schemas (and their corresponding resolvers) would result in:

interface A {
  helloWorld: String
  goodnightMoon: String
}

ACTUAL RESULT:

Error: A.goodnightMoon defined in resolvers, but not in schema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant