graphql_builder icon indicating copy to clipboard operation
graphql_builder copied to clipboard

How to pass a fragment in a query?

Open Macorreag opened this issue 3 years ago • 1 comments

query{
  user(
    input: {      
      userUuid: "ID",
      name: "FooName"
    }
  ){
    ... user
  }
}

How can I add a snippet as a result of a query in the response fields?

%GraphqlBuilder.Query{
      operation: :user,
      variables: [],
      fields: ["... user"]
    }

Macorreag avatar Jun 07 '22 21:06 Macorreag

Thank you for adding this issue, @Macorreag ! We just haven't needed this functionality yet, but it definitely should be a good addition.

What do you think of my PR here? If this looks good to you, I can merge and cut another release.

https://github.com/billperegoy/graphql_builder/pull/15

djthread avatar Jun 17 '22 16:06 djthread