question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generate Relay Connection (Version: 3.0.0)

See original GitHub issue

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”

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
vinaybedrecommented, Aug 30, 2020

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

0reactions
kobylynskyicommented, Sep 3, 2020

@vinaybedre The feature will soon be released as part of 3.1.0.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found