Support more GraphQL formats
Hi!
This extension is great, thank you. It works great on GitHub, but there are a couple of other websites that use GraphQL that are not detected.
Twitch - https://www.twitch.tv/
- Endpoint: https://gql.twitch.tv/gql
- I don't think it's detected because the extension assumes the
queryhas to be at the top level. Here an array of queries are sent.
Instagram - https://www.instagram.com/
- Endpoint: https://www.instagram.com/graphql/query/
- Try the search feature. A
query_hashis sent, so I guess we don't have access to the actual query, which is a shame. But variables are present. Might be harder to support, but I figured I'd mention it at least.
That's the two I tested immediately after installing the extension. Thanks!
This extensions looks really really good, but gotta add a +1 to this as it fails to detect a lot of GraphQL end points, which makes it not very useful :(
@s12v Are you considering adding support for more endpoints?
EDIT: I looked into it, the issue is lots of GraphQL API's use mutliple operations in a query string. Like this:
'[{"operationName": "one", "variables":{},"query":"query testOne {\n one \n} }\n"}, {"operationName": "two", "variables":{},"query":"query testTwo {\n two \n} }\n"}]'
I'm working on a PR at the moment, but I'm new to React/Extensions...
#7 PR made, hopefully this fixes it.