Closed Isma3ilMohamed closed 10 months ago
same i have the same error !!!
@Isma3ilMohamed hi! Do you have any kind of graphql configuration in the project? And could you describe your project structure? Also, are there any graphql errors in the GraphQL tool window?
@vepanimas thanks for reply I've a multimodule structure such as make a module for schema and inside it i setup my graphql config like that
schema: schema.graphqls
extensions:
endpoints:
Default GraphQL Endpoint:
url: https://example.com/graphql/
headers:
user-agent: JS GraphQL
introspect: false
then I made a separate module depend of features and inside these modules I've used graphql files for queries and mutations
so in schema module everything is fine but in features modules graphql files can't find any query or mutation and give me an error like in the question
about tool window
in schema module
but in any feature modules
it didn't show my any configurations
however that happened in new version but in previous versions it worked
@Isma3ilMohamed is the structure of the project something like this?
root
module1
schema.graphql
graphql.config.yml
module2
someQuery.graphql
yes @vepanimas it's exactly like that
root
module1
schema.graphql
graphql.config.yml
Fragments.graphql
module2
someQuery.graphql
module3
someQuery.graqhql
someMutations.graphql
....etc
@Isma3ilMohamed is it possible to move the config to the root and change the corresponding paths inside of it? Because the plugin can't actually find a schema for module2 and module3. In the previous releases it worked, because the plugin just ignored a config in your case and worked globally for the whole project.
hey @vepanimas sorry for being late and I made your recommended edits and it works move the configuration file in root and edit schema path like that
schema: schema_module/src/main/graphql/com/example/schema.graphqls
extensions:
endpoints:
Default GraphQL Endpoint:
url: https://example_url.com/graphql/
headers:
user-agent: JS GraphQL
introspect: false
but I've another issue as you see i made a specific file for fragment and need to know if there is anyway to add fragments file path reference to the configuration file in order to be visible for other files in other modules If not possible we could close this issue and thanks so much for your help
@Isma3ilMohamed I'm unsure if I understood a question correctly, but it looks like specifying the documents
key including your fragments should help. Have you tried it? Something like that:
projects:
frontend:
schema: https://my.api.com/graphql
documents: frontend/**/*.{graphql,js,ts}
exclude: queries/**
backend:
schema: backend/schema.graphql
documents: backend/**/*.graphql
yes that is working with me 👏 thanks @vepanimas for your support
hey everyone
I'm working on multi module project and have a module for schema
and feature modules for different feature in a project
so while typing any query, mutation or use fragment from schema module it shows me this error
project build successfully and queries, mutation also generated but file show error on whole stuff and this one for example
so i want to know how to fix that in order to could use autocomplete
my android studio version
Android Studio Giraffe | 2022.3.1
and the plugin version
4.0.1-222
thanks for all