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
Extending input types #641
Comments
Thanks. Great to see it's on the agenda already. Once this is implemented in |
I'm waiting on my PR to get merge with the You can find my WIP fork here which add support for enum/union/input extension to |
Yeah, we won't be able to put this in graphql-tools until it's in the GraphQL specification, since we don't want to accidentally fork the spec. |
Oh whoooooops OK it's actually merged there. Does it still not work in graphql-tools? What do we need to do? |
Anyone know why its mechanism is still different from const typeDefAry = [
`
type Query {
foo: String
}`,
`
extend type Query {
bar: String
}
`,
];
const jsSchema = makeExecutableSchema({
typeDefs: typeDefAry,
resolvers: {},
});
expect(jsSchema.getQueryType().name).to.equal('Query');
expect(jsSchema.getQueryType().getFields()).to.have.all.keys('foo', 'bar'); With inputs, it's different: const typeDefAry = [
`
input Query {
foo: String
}`,
`
extend input Query {
bar: String
}
`,
];
const jsSchema = makeExecutableSchema({
typeDefs: typeDefAry,
resolvers: {},
});
expect(jsSchema.getQueryType().name).to.equal('Query');
expect(jsSchema.getQueryType().getFields()).to.have.all.keys('foo', 'bar'); Only the key Any ideas? If not, I'd be happy to go looking. Update: Found why it's not working in #948 |
I'm finding that
extend
doesn't work as expected forinput
types.Is this a bug, a deliberate omission or just a feature that has not yet been implemented?
The text was updated successfully, but these errors were encountered: