You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started to use the GraphQL module and I must say that it is awesome. However, I had some difficulties to perform POST requests against my GraphQL endpoints (GET requests works out of the box).
At this point, everything looks like working fine for me and I'm pretty happy with this solution. Could any of you give me some impression on this implementation? Is it the way to go? (if yes, then we should maybe add those details to the documentation)
Thanks for your time 😄
The text was updated successfully, but these errors were encountered:
Thanks! I think I don't have enough experience with Nest to submit a PR for this. How could we setup this as part of the GraphQL module and still configure the routes to which it should be applied?
In the next release, nest won't be wholly dependent of express library. That's why we cannot make this middleware a part of the graphql package since it won't be compatible with any other HTTP provider (like, for example, fastify). Luckily, @fwoelffel solution should work for any other person who would encounter a similar problem 🙂
Hi guys,
I started to use the GraphQL module and I must say that it is awesome. However, I had some difficulties to perform POST requests against my GraphQL endpoints (GET requests works out of the box).
I'm using the following packages:
Here is my GraphQL module implementation, according to the Nestjs documentation:
With the following request:
I get the following response:
I found the solution reading some Apollo documentation; all I had to do was to add the following middlewares to my endpoint:
At this point, everything looks like working fine for me and I'm pretty happy with this solution. Could any of you give me some impression on this implementation? Is it the way to go? (if yes, then we should maybe add those details to the documentation)
Thanks for your time 😄
The text was updated successfully, but these errors were encountered: