AO Folts
AO Folts

Reputation: 499

How do you view all available child fields in GraphiQL?

Let's say I have a field called featuredImage.

If I start typing "id," for example, it will show that as an available sub field using autocomplete.

But what if you don't know what the sub fields are?

{
  featuredImage {
    // What fields are available?
  }
}

How do you use GraphQL to show what sub fields are available?

Upvotes: 2

Views: 763

Answers (1)

jkdowdle
jkdowdle

Reputation: 178

Try the keyboard shortcut by doing 'ctrl + space' and it should bring up all the options, similar in many text editors.

{ 
  featuredImage {
    /* ctrl + space */
    /* displays options */
  }
}

Upvotes: 3

Related Questions