Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing graphql request? #64

Closed
pyrossh opened this issue Aug 2, 2016 · 7 comments
Closed

Exposing graphql request? #64

pyrossh opened this issue Aug 2, 2016 · 7 comments

Comments

@pyrossh
Copy link

pyrossh commented Aug 2, 2016

I know that you can access the request object when you initiate the middleware but is it possible for me to get the graphql request's info also so that I can log it,
example:

graphqlHTTP((request, context) => {
       console.log(request.graphqlQuery);
       console.log(request.graphqlVariables);
})

Right now when I make a post request, I don't know what requests are hitting my server?

@chentsulin
Copy link
Member

This is impossible at this moment. Open a new issue at express-graphql: graphql/express-graphql#113

Relative issue: #6

@sibelius
Copy link
Contributor

@pyros2097 have u figure it out how to do this?

@chentsulin is there any workaround for now? like logging POST data

@pyrossh
Copy link
Author

pyrossh commented Aug 24, 2016

Nope... I thought of doing a fork but then lost interest since it gets cumbersome to maintain it and add it as a dependency.

@chentsulin
Copy link
Member

chentsulin commented Aug 25, 2016

@sibelius Sorry, but there is no workaround for this now. I can add a custom logger here: https://github.com/chentsulin/koa-graphql/blob/master/src/index.js#L159, but I prefer waiting for @leebyron 's feedback in graphql/express-graphql#113 .

@chentsulin
Copy link
Member

@sibelius @pyros2097 #79 introduce a new point to extend, will this help you?

@pyrossh
Copy link
Author

pyrossh commented Nov 13, 2016

Yep!

@pyrossh pyrossh closed this as completed Nov 13, 2016
@sibelius
Copy link
Contributor

tks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants