Skip to content

Generate Relay Connection (Version: 3.0.0) #295

@vinaybedre

Description

@vinaybedre

Issue Description

I am using GraphQL Java Kickstarter's relay function. See https://www.graphql-java-kickstart.com/tools/relay/
I have below schema:

type Query {
    users(first: Int, after: String): UserConnection @connection(for: "User")
    organizations(first: Int, after: String): OrganizationConnection @connection(for: "Organization")
}

type User {
    id: ID!
    name: String
}

type Organization {
    id: ID!
}

Steps to Reproduce

In a Java project, under gradle, setup basic graphql-java-codegen config, copy the above schema to resources as .graphqls file, run Gradle task graphqlCodegen

Expected Result

Generate model classes UserConnection and OrganizationConnection
The associated query should have signature

public Connection<User> users(int first, String after, DataFetchingEnvironment env);

Actual Result

The model classes are missing.

UserConnection users(Integer first, String after, graphql.schema.DataFetchingEnvironment env) throws Exception;

Your Environment and Setup

  • graphql-java-codegen: 3.0.0
  • Build tool: Gradle
  • Java tool: openjdk version "14.0.1"

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions