Typescript: MeshContext type enhancement with headers and query paramenters #2094
Unanswered
mgiamberardino
asked this question in
General
Replies: 1 comment 1 reply
-
headers and query are not part of GraphQL Mesh Context. They are coming from HTTP Server. If we change MeshContext like that, the users, who use Mesh locally without an HTTP server, that wouldn't fit their usecase. You can create your own type by combining IncomingMessage from http and MeshContext from runtime packages; |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I don't know if this really fits here but I think it will be useful for adding additionalResolvers using typescript to add headers and query params as part of the MeshContext type.
Currenlty MeshContext type is:
And I was thinking in something like:
Let me know if you are ok with this, I can raise the PR myself, it would be my first open-source contribution 🙃.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions