maddhruv / graphql-en-devtools

GraphQL en Devtools :wrench:
https://chrome.google.com/webstore/detail/graphql-en-devtools/mmnjajaibkfgdiabekenmijmihgggdek
Apache License 2.0
0 stars 1 forks source link

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

Open Aksh-a1 opened 3 years ago

Aksh-a1 commented 3 years ago

It seems at current moment it is only working for /graphqlendpoint, 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?

maddhruv commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

@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