js-graphql-intellij-plugin icon indicating copy to clipboard operation
js-graphql-intellij-plugin copied to clipboard

Introspection query was overwritten

Open dkimot opened this issue 3 years ago • 1 comments

I can't reproduce this issue but I did fix it for myself and wanted to report it. It's a doozy.

My introspection wasn't working and when I checked the body of the introspection request it looked like this: {"query":"https:\/\/server.url\/graphql"}. server.url is a placeholder. This led to the GraphQL error 'unexpected name "https"'.

I couldn't figure out where this was coming from and when I checked the source code I found out the GraphQLSettings class' serialized property introspectionQuery.

I went and checked inside .idea and sure enough there was a file called graphql-settings.xml with the key/value pair that set the introspection query to the url of my GraphQL server.

I have no idea how this happened but I've been fighting this for a few hours now. I wanted to report it and maybe help someone out along the way if they break the same thing as me.

dkimot avatar Dec 03 '21 07:12 dkimot

Hi @dkimot! I found a similar issue https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/issues/505#issuecomment-956320915, looks like you accidentally changed an introspection query in the settings (graphql-settings.xml is exactly a serialized form of them). Seems like a UX problem.

query

vepanimas avatar Dec 03 '21 23:12 vepanimas