Generate Relay Connection (Version: 3.0.0)
See original GitHub issueIssue 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”
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Relay
GraphQL Connections are a model for representing lists of data in GraphQL, ... Relay generates Flow or TypeScript types for each of your...
Read more >[tor-relays] Tor DDoS Mitigation iptables scripts updated to ...
Background: A set of bash scripts used to apply iptables rules to fight the current DDoS attacks. They require no dependencies to install...
Read more >CGIN 3.0.0 :: Changelog
This version of the OCSS7 TCAP stack supports ANSI SCCP when connected to SGCs with version at least 2.1.0.0 and remains backwards compatible...
Read more >cnMaestro 3.0.0 (On-Premises) - Cambium Community
If you are using cnMaestro X features, it is strongly recommended to create a Cloud Anchor account and connect On-Premises instances to it....
Read more >pylinkirc
PyLink is licensed under the Mozilla Public License, version 2.0 ... For Unicode support in Relay: unidecode ( pip3 install Unidecode ) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kobylynskyi Sorry for messing things up. I was working on to get a custom relay up to working and I mistyped. The point of this bug ticket/issue should be to adhere to official relay specification and hence, the interface should return
Connection<User>
More info on why relay should be used can be viewed here https://www.howtographql.com/react-relay/8-pagination/@vinaybedre The feature will soon be released as part of 3.1.0.