graphql-tag icon indicating copy to clipboard operation
graphql-tag copied to clipboard

Question: how to get the string?

Open thojanssens opened this issue 4 years ago • 1 comments

Say I have a query document like so:

const query = gql`
  {
    user(id: 5) {
      ...User_user
    }
  }
  ${userFragment}
`

How do I get now the string to add in the body request? I end up with an object, which allows me to do some introspection and manipulations, but how to get the actual body for the request?

thojanssens avatar Mar 05 '22 11:03 thojanssens

https://github.com/apollographql/graphql-tag/issues/206#issuecomment-1173991680

mktcode avatar Feb 22 '23 23:02 mktcode