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

Log gql query before it is sent. #321

Open
fmatuszewski opened this issue Jul 21, 2022 · 1 comment
Open

Log gql query before it is sent. #321

fmatuszewski opened this issue Jul 21, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@fmatuszewski
Copy link

Is it possible to add interceptor to gql_link so that I can display queries before it is sent. I know there is some kind of a transformer maybe it can be used.

@knaeckeKami
Copy link
Collaborator

You can use a TransformLink to log requests and responses. Just log to query and then return it in the ?requestTransformer` .

Or you can log in the HTTP layer, e.g. if you use dio, you can just add a PrettyDioLogger to your dio client.

@knaeckeKami knaeckeKami added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants