JetBrains / js-graphql-intellij-plugin

GraphQL language support for WebStorm, IntelliJ IDEA and other IDEs based on the IntelliJ Platform.
https://jimkyndemeyer.github.io/js-graphql-intellij-plugin/
MIT License
880 stars 97 forks source link

operationName for Apollo Federation Gateway #595 #596

Open SammoMichael opened 2 years ago

SammoMichael commented 2 years ago

Because of the way some GraphQL Servers are setup, a operationName key is required in the data object

{ "operationName": "SomeQuery", "query": {}, "variables": {}}

Added operationName key to dynamically add query, mutation, or subscription name to data object or anonymous in unnamed using regex matchers to extract the correct name from query

also set up UI to make the data key/value editable to user/opt-in. Users can configure a different keyname if needed

not sure if there is already some way built-in to accomplish this, but wanted to setup at least for my company and maybe if generalizable could be useful for others

SammoMichael commented 2 years ago
Screen Shot 2022-02-11 at 1 22 20 AM

Everything should be working as intended, let me know what you think if you get a chance, thanks! @vepanimas

SammoMichael commented 2 years ago

Another question I had was I am having trouble building my fork of the plugin for Android Studio, is there an easiest way to configure a build that will work with Android Studio ? I guess I need some more practice with plugin versioning, even having trouble with Intellij, keep getting hit with different incompatibility errors :(