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

Only working for /graphql endpoint and not all endpoints containing /graphql/<> #1

Open
Aksh-a1 opened this issue Oct 16, 2020 · 3 comments

Comments

@Aksh-a1
Copy link

Aksh-a1 commented Oct 16, 2020

It seems at current moment it is only working for /graphql endpoint, I tested for Angular website using graphql which makes endpoint as /graphql/query and it didn't seem to catch those requests. Might be good to add capability to work with all kind of endpoints containing /graphql/<> and not just /graphql ones?

@Aksh-a1 Aksh-a1 changed the title Only working for React website and not all websites using graphql. Only working for /graphql endpoint and not all endpoints containing /graphql/<> Oct 16, 2020
@maddhruv
Copy link
Owner

Thanks @Aksh-a1 for raising this issue, I am already on it.

Basically there will be more endpoints added by default as well as, you can add custom endpoints and regex possibly for filtering the queries

@Aksh-a1
Copy link
Author

Aksh-a1 commented Oct 17, 2020

Looks like this issue was something else. Digging further into the issue I found that it was not the problem of the endpoint, but of the query not having operation name 😅 . Refer the screenshot below:
trim

@maddhruv
Copy link
Owner

@Aksh-a1 I see two issues popping up here:

  1. Endpoint filter - as the extension is not able to filter the endpoints without graphql in them.
    and
  2. the operation: req.operationName.trim(), doesn't has the trim method when there is no operation in the query

Possible solutions I am making -

  1. Adding more endpoints filter built-in (graphql, query etc) and also providing a preferences or modifications option to provide regex/string to filter in the endpoint
  2. need to find an alternate identifier in case req.operationName is not present

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

2 participants