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

Allow extending types that haven't been declared #116

Merged
merged 1 commit into from
Feb 8, 2020
Merged

Conversation

vektah
Copy link
Owner

@vektah vektah commented Feb 6, 2020

This comes in handy for apollo federation, and generatlly when decomposing schema down into small files.

eg when defining user.schema you might have:

extend Query {
   user(id: ID!): User
}

type User {
   id: ID!
   name: String!
}

If your whole app is architected like that then you don't have any file that should own the root query/mutation/schema types, which would be empty anyway. Allowing them to be created on the first extension removes this little wrinkle.

@vektah vektah merged commit 4684b46 into master Feb 8, 2020
@vektah vektah deleted the extends-missing branch February 8, 2020 04:43
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

Successfully merging this pull request may close these issues.

1 participant