Code Monkey home page Code Monkey logo

Comments (12)

etienne-sf avatar etienne-sf commented on August 28, 2024

DirectiveDefinition are currently not managed.
It's on the TODO list...

from graphql-maven-plugin-project.

etienne-sf avatar etienne-sf commented on August 28, 2024

I'll make the plugin more tolerant with GraphQL features that it doesn't manage

from graphql-maven-plugin-project.

abedeoan avatar abedeoan commented on August 28, 2024

I can confirm that, with version 1.3.1, the error from the initial post does not occur anymore.

I am not sure though if this means that the feature is fully supported now?

from graphql-maven-plugin-project.

etienne-sf avatar etienne-sf commented on August 28, 2024

Right. It is not really supported.

I'm working on it.

from graphql-maven-plugin-project.

abedeoan avatar abedeoan commented on August 28, 2024

Thank you for the update!

from graphql-maven-plugin-project.

etienne-sf avatar etienne-sf commented on August 28, 2024

I released the 1.5.0 yesterday.

Can you confirm that this issue is solved ?

from graphql-maven-plugin-project.

DirkMahler avatar DirkMahler commented on August 28, 2024

Just tried but ran into a problem: we're using the Neo4j GraphQL Java library (https://github.com/neo4j-graphql/neo4j-graphql-java) on the server side and from that directives to specify relations:

type Person {
  name : String
  actedIn: [Movie] @relation(name:"ACTED_IN", direction:OUT)
}

This results in an error during code generation:

The directive named 'relation' could not be found

If we add the directive definition...

directive @relation(
    name: String
    direction: direction
) on FIELD_DEFINITION

enum direction {
    IN
    OUT
}

...to our schema another problem occurs:

Caused by: java.lang.RuntimeException: Error when trying to execute 'getValue' on 'graphql.language.EnumValue': graphql.language.EnumValue.getValue()
    at com.graphql_java_generator.GraphqlUtils.invokeMethod (GraphqlUtils.java:366)
    at com.graphql_java_generator.plugin.DocumentParser.readAppliedDirectives (DocumentParser.java:477)
    at com.graphql_java_generator.plugin.DocumentParser.readFieldTypeDefinition (DocumentParser.java:719)
    at com.graphql_java_generator.plugin.DocumentParser.readField (DocumentParser.java:694)
    at com.graphql_java_generator.plugin.DocumentParser.lambda$readObjectType$12 (DocumentParser.java:534)

from graphql-maven-plugin-project.

etienne-sf avatar etienne-sf commented on August 28, 2024

Hum, hum,

So you're using the client part of this plugin, right ?
Which version ?

Can you provide the GraphQL schema you use, so that we can repeat this error ?

from graphql-maven-plugin-project.

etienne-sf avatar etienne-sf commented on August 28, 2024

And by the way, please don't pollute existing threads.
Please create your own, as this is a specific issue.

from graphql-maven-plugin-project.

DirkMahler avatar DirkMahler commented on August 28, 2024

Created a separate issue: #35

from graphql-maven-plugin-project.

etienne-sf avatar etienne-sf commented on August 28, 2024

Thank you
:)

from graphql-maven-plugin-project.

etienne-sf avatar etienne-sf commented on August 28, 2024

Support for the directive has been released in the 1.5.0 version

from graphql-maven-plugin-project.

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.