Support for Content-Type: application/graphql #34
Replies: 5 comments 3 replies
-
For manually building the requests - have you checked out out the GraphQL client functionality that can be used with codegen? It provides a query builder API that you can use to construct your query and serialize into a string. The Type-safe Query API section described how to set that up. |
Beta Was this translation helpful? Give feedback.
-
Is the difference that the query, operation name, etc., are all provided a separate request parameters? Is that for GET requests only? I’m not familiar with application/GraphQL so I’m trying to understand what it is and why it’s useful. Also, are there commonly used clients that support this? |
Beta Was this translation helpful? Give feedback.
-
Thanks guys for your input. My description could have misled you - what I meant by manually built requests was this kind of manual requests:
I use this kind of raw HTTP requests with IntelliJ, which has nice features for it (in case you've missed it: https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html). I don't know if there are any clients supporting this, it's still new to me. My point is: why write requests like this when you can achieve the same thing that way. |
Beta Was this translation helpful? Give feedback.
-
Added an issue for this new feature: #43 |
Beta Was this translation helpful? Give feedback.
-
This is now supported! See PR #166 for context |
Beta Was this translation helpful? Give feedback.
-
Do you plan on adding support for
Content-Type: application/graphql
header, likegraphql-java-spring
does? I find it more convenient in use with manually built requests. With JSON one needs to supply whole query in a single string, which can't be broken into lines. It's not very readable even for simple queries. What do you think?Cheers!
Beta Was this translation helpful? Give feedback.
All reactions