Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent GraphQL Queries from Impacting Common Codegened Names #10

Open
harrysolovay opened this issue Aug 27, 2024 · 2 comments
Open

Prevent GraphQL Queries from Impacting Common Codegened Names #10

harrysolovay opened this issue Aug 27, 2024 · 2 comments

Comments

@harrysolovay
Copy link
Member

harrysolovay commented Aug 27, 2024

Seems new queries sometimes result in differently named types in the codegen. For instance Account -> Account2 upon introduction of mempool queries. Also affected: DaemonStatus -> DaemonStatus3.

@harrysolovay
Copy link
Member Author

The issue comes from multiple queries that specify different selection sets on the same object. The end result is different structs representing those different selection sets. Unfortunately, this compromises our ability to use a single Into implementation for the same objects (even if they select all the same data required by the implemented fn into). This could potentially be addressed by obmarg/cynic#1015. In the meantime, we can just use fragments for common selection sets.

@harrysolovay
Copy link
Member Author

We need a new cynic release in order to be able to use fragments on interfaces such as UserCommand. The desired change is here: obmarg/cynic#1018.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant