Idea+Graphls: graphl schema file splitted into different libs

Answered

Hi all,
I have a spring boot project (ProjA) that exposes a graphql endopoint...my graphql schema is splitted into several small files and everything is ok.
Now let's assume that i have:

  • file one.graphqls that contains common objects defintion i.e. a definition of a type called "CommonObj"
  • file two.graphqls that contains definition related to a specific object
  • file two.graphqls refers to the "CommonObj" type defined in file one.graphqls

This configuration is ok and in Intellij Idea i can navigate through type definitions even if they are defined in different files.

Now i need to move the one.graphls into another project ( a common library called ProjB ): ProjA import ProjB as an artifact via maven.
The problem is:

  • everything is working and i can call my grapqhl endopoint without problem ( the file one.graphqls is correctly detected in classpath even if contained into an external lib)
  • Intellij Idea IS NOT ABLE to detect the file one.graphls so when i open the file two.graphqls i'm not able to navigate through type definition

Is there a way to solve it?
Sorry for my English....

Ale

0
3 comments

Hi Ale,

Does reloading the project help (right-click on pom.xml > Maven > Reload Project)?

0
Avatar
Permanently deleted user

I tried but the problem remains.

0

Can you share your project (or a similar demo project illustrating the problem) so that we can try to reproduce the issue?

Please also attach the information from the Help | About screen (there's a 'copy' button there on the left of the text area).

0

Please sign in to leave a comment.