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

Enable/Disable type field selection on interfaces #49

Open
JacobMountain opened this issue Dec 31, 2020 · 0 comments
Open

Enable/Disable type field selection on interfaces #49

JacobMountain opened this issue Dec 31, 2020 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@JacobMountain
Copy link
Owner

Currently, when queries return interfaces all possible fields are selected: e.g.
Schema:

type Query {
    named: Named
}
type Person implements Named {
    name: String
    dogs: [Dog]
}
type Dog implements Named {
    name: String
    owner: Person
}
interface Named {
    name: String
}

Will generate query:

query Named {
    named: {
       name
       ... on Person {
           pets {
              name
           }
       }
       ... on Dog {
           owner {
              name
           }
       }
    }
}

But if we disable this new option (on @GraphQLQuery) it would generate just

query Named {
    named: {
       name
    }
}
@JacobMountain JacobMountain added enhancement New feature or request help wanted Extra attention is needed labels Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant