Search code examples
graphqlgraphql-java

Is it possible to call a query field without subselection? Like having default fields?


When I write my queries to fetch a non-scalar type I often forget to include a subselection of the types fields I should see. Is there a way to actually have some fields being subselected by default if I ommit the subselection syntax?


Solution

  • Nope. Nothing like it in the spec. I'd say the reason is you'd be almost guaranteed to often select an infinite (or at least humongous) graph by accident.