Skip to content
Advertisement

Why WebStorm show errors in gql query inside apollo object in Vue component or .grapgql files

I have a problem with WebStorm syntax highlighting. I created valid GraphQL query which works on localhost app but WebStorm says that

unknown field “familyMembers” on object type “Query”

and highlights the whole query in red.

I am really confused but maybe I should change something inside apollo.config.js – if yes please tell me what.

HelloWorld.vue

JavaScript

apollo.config.js

JavaScript

Some screenshots:

enter image description here

enter image description here

Advertisement

Answer

Ok so I figured out how to do this you do not need apollo.config.js you have to create .graphqlconfig in which you will declarate local schema path and endpoint url like that:

JavaScript
Advertisement