Skip to content

Instantly share code, notes, and snippets.

@colinfwren
Created April 17, 2022 21:49
Show Gist options
  • Save colinfwren/e59c63e6679648cc9c29732666fc6417 to your computer and use it in GitHub Desktop.
Save colinfwren/e59c63e6679648cc9c29732666fc6417 to your computer and use it in GitHub Desktop.
Query schema with connections to get linked nodes
query Query {
products {
name
userStoriesConnection {
edges {
author
node {
name
}
}
}
}
mockups {
name
tests {
name
}
userStories {
name
}
}
}
"""
Returns
{
data {
products [
{
name: 'Chocolate Box',
userStoriesConnection: {
edges: [
{
author: 'Colin',
node: {
name: 'Customer Views Chocolates Product List'
}
}
]
}
}
],
mockups [
{
name: 'Landing Page',
tests: [
{
name: 'Existing User buys Flowers'
}
]
}
]
}
}
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment