Code Monkey home page Code Monkey logo

Comments (9)

Isma3ilMohamed avatar Isma3ilMohamed commented on June 10, 2024 2

yes that is working with me 👏
thanks @vepanimas for your support

from js-graphql-intellij-plugin.

vepanimas avatar vepanimas commented on June 10, 2024 1

@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

from js-graphql-intellij-plugin.

amrkamal123 avatar amrkamal123 commented on June 10, 2024

same i have the same error !!!

from js-graphql-intellij-plugin.

vepanimas avatar vepanimas commented on June 10, 2024

@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?

from js-graphql-intellij-plugin.

Isma3ilMohamed avatar Isma3ilMohamed commented on June 10, 2024

@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
image

but in any feature modules
it didn't show my any configurations
image

however that happened in new version but in previous versions it worked

from js-graphql-intellij-plugin.

vepanimas avatar vepanimas commented on June 10, 2024

@Isma3ilMohamed is the structure of the project something like this?

root
    module1
        schema.graphql
        graphql.config.yml
    module2
        someQuery.graphql

from js-graphql-intellij-plugin.

Isma3ilMohamed avatar Isma3ilMohamed commented on June 10, 2024

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

from js-graphql-intellij-plugin.

vepanimas avatar vepanimas commented on June 10, 2024

@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.

from js-graphql-intellij-plugin.

Isma3ilMohamed avatar Isma3ilMohamed commented on June 10, 2024

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

from js-graphql-intellij-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.