Open aexol opened 3 years ago
Add * field to construct a query with all scalar and enum fields.
*
enum Kind{ FISH BIRD } type Animal{ name: String! friends: [Animal!]! age: Int! kind: Kind! } type Query{ animals: [Animal!]! } schema{ query: Query }
Gql.query({ animals:{ '*': true } })
should result in
{ animals{ name age kind } }
Is there a runtime way to just grab all the fields that a particular query path may have? That way you could introduce mixins as well, like an Omit(Queries.animal, ['age']).
I suggest api similar to genql's one:
import { everything } from "./zeus-graphql" Gql.query({ animals:{ ...everything, age: false, } })
Add
*
field to construct a query with all scalar and enum fields.should result in