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

FIX: Predecessors Invalid Record error #179

Open
benjamineac opened this issue Jul 25, 2022 · 0 comments
Open

FIX: Predecessors Invalid Record error #179

benjamineac opened this issue Jul 25, 2022 · 0 comments
Labels
API for project filtering nshm-toshi-api

Comments

@benjamineac
Copy link
Collaborator

Current behaviour: When querying Scaled Solution/Time Dependent Solution in TEST environment relay returns error eg:

Warning: RelayResponseNormalizer: Invalid record RmlsZToxMDAwNjk=. Expected __typename to be consistent, but the record was assigned conflicting types Predecessor and File. The GraphQL server likely violated the globally unique id requirement by returning the same id for different objects.

https://relay.dev/docs/debugging/inconsistent-typename-error/

Haven't noticed any impact on TUI client but have had issues in the past with this specific error so could lead to problems in future.

Example query:

  nodes(id_in: [
    "QXV0b21hdGlvblRhc2s6MTAxMTUx",
    "QXV0b21hdGlvblRhc2s6MTAxMTUy"
  ]
) {
    result {
      edges {
        node {
          __typename
          ... on AutomationTask {
            created
            task_type
            id
            files {
              edges {
                node {
                  file {
                    __typename
                    ... on ScaledInversionSolution {
                      id
                      meta {
                        k
                        v
                      }
                      predecessors {
                        __typename
                        pre_id: id
                        relationship
                        depth
                        node {
                          __typename
                          ... on File {
                            file_meta: meta {
                              k
                              v
                            }
                          }
                          ... on InversionSolution {
                            is_meta: meta {
                              k
                              v
                            }
                          }
                          ... on TimeDependentInversionSolution {
                            td_meta: meta {
                              k
                              v
                            }
                          }
                          ... on Node {
                            __isNode: __typename
                            id
                          }
                        }
                        id
                      }
                    }
                    ... on TimeDependentInversionSolution {
                      id
                      meta {
                        k
                        v
                      }
                      predecessors {
                        __typename
                        pre_id: id
                        relationship
                        depth
                        node {
                          __typename
                          ... on File {
                            file_meta: meta {
                              k
                              v
                            }
                          }
                          ... on InversionSolution {
                            is_meta: meta {
                              k
                              v
                            }
                          }
                          ... on TimeDependentInversionSolution {
                            td_meta: meta {
                              k
                              v
                            }
                          }
                          ... on Node {
                            __isNode: __typename
                            id
                          }
                        }
                        id
                      }
                    }
                    ... on Node {
                      __isNode: __typename
                      node_id: id
                      id
                    }
                  }
                }
              }
            }
            inversion_solution {
              id
              file_name
              mfd_table_id
              meta {
                k
                v
              }
              tables {
                table_id
                table_type
              }
            }
          }
          ... on Node {
            __isNode: __typename
            id
          }
        }
      }
    }
  }
}
@chrisbc chrisbc added nshm-toshi-api API for project filtering labels Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API for project filtering nshm-toshi-api
Projects
None yet
Development

No branches or pull requests

2 participants