Graphql-tag: allow GraphQL syntax tree object -> string

Created on 17 Jul 2017  路  1Comment  路  Source: apollographql/graphql-tag

Is there a way to build back the string query form the GraphQL syntax tree object ?

If not, it will be useful to display the GraphQL syntax tree object in a readable human way...

Most helpful comment

I answer to my own question:

const query = gql`${thequery}`
console.log(query.loc.source.body)

>All comments

I answer to my own question:

const query = gql`${thequery}`
console.log(query.loc.source.body)
Was this page helpful?
0 / 5 - 0 ratings