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

Codegen results in non-compiling Elm files #43

Open
Janiczek opened this issue Nov 30, 2023 · 0 comments
Open

Codegen results in non-compiling Elm files #43

Janiczek opened this issue Nov 30, 2023 · 0 comments

Comments

@Janiczek
Copy link
Contributor

This is related to the Vendr repository as of commit 6eff9cc90cc.

When changing the ContractDetailInit query in ContractDetail/Api.gql, so that the ... on Contract case uses the fragment ...Contract instead of selecting fields manually:

query ContractDetailInit($id: ID!) {
  contract(id: $id) {
    ... on Contract {
      __typename
      ...Contract
    }
    ... on PermissionDeniedError {
      __typename
    }
    ... on NotFoundError {
      __typename
    }
  }

the codegen happens fine, but then the codegen'd Elm files don't compile:

Elm files failed to compile:

-- NAMING ERROR --- types/src/api/Page/ContractDetail/Api/ContractDetailInit.elm

I cannot find a `Contract_Contract_Details` variant:

145|                                 (Json.Decode.succeed Contract_Contract_Details
                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^
These names seem close though:

    Contract_Contract

If this is too much / too little detail, let me know!

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

No branches or pull requests

1 participant