Request.Query differs from the graphql code as written in the source because, among other things, the @genqlient directive has been removed.
For our application, we'd like to know in Go code what the actual text-over-the-wire is. We can look in generated/safelist.json, but it would be easier just to expose it in Go. I'm thinking of an API like this:
(Technically the suffix should probably be Operation although every GraphQL library is wildly inconsistent about this so if you feel Query is clearer that's ok too.)
Generated genqlient code might look like this:
Request.Query
differs from the graphql code as written in the source because, among other things, the@genqlient
directive has been removed.For our application, we'd like to know in Go code what the actual text-over-the-wire is. We can look in generated/safelist.json, but it would be easier just to expose it in Go. I'm thinking of an API like this:
Is this a change you would be amenable to seeing?