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

GQL union to Haxe enum with fragment support #46

Open
skilgoreT opened this issue Jul 23, 2024 · 0 comments
Open

GQL union to Haxe enum with fragment support #46

skilgoreT opened this issue Jul 23, 2024 · 0 comments

Comments

@skilgoreT
Copy link

Issue #43 introduced support of mapping GQL union types to Haxe algebraic enum. This issue is tracking adding support for __typename type queries in the presence of fragments in named operations.

This GQL should generate correct code

fragment ContentModuleFragment on ContentModule {
  __typename
  ...on PollModule {
    poll_id
    content_type
  }
  ...on TaskListModule {
    tasklist_id
    content_type
  }
}

type Query
{
  content_module_by_id(id: ID!): ContentModule!
}

query GetContentModuleByIdWithFrag($id: ID!) {
 content_module_by_id(id: $id) {
    ...ContentModuleFragment
  }
}

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