Skip to content

Extension sending invalid queries to Apollo studio #109

Open
@mattoni

Description

@mattoni

It appears that using fragment queries with this extension attaches an extra } to the end of the fragment portion when sending to Apollo Studio, causing parse errors for the vast majority of my queries. Here's an example of what I see in Apollo Studio:

image

And the query in question:

fragment missingCaps on MissingCapabilities {
  __typename
  message
  required
  oneof
}
fragment pilot on Pilot {
  id
  name
}

fragment catchAll on Error {
  __typename
  message
}
query pilotList {
  operatorList(role: ROLE_PILOT) {
    ... on SpecificOperatorConnection {
      edges {
        node {
          __typename
          ...pilot
        }
        __typename
      }
      __typename
    }
    ...missingCaps
    ...catchAll
    __typename
  }
}

And what Apollo Studio sees:

fragment missingCaps on MissingCapabilities{ __typename message required oneof }} fragment pilot on Pilot{ id name }} fragment catchAll on Error{ __typename message }} query pilotList { operatorList(role: ROLE_PILOT) { ... on SpecificOperatorConnection { edges { node { __typename ... pilot } __typename } __typename } ... missingCaps ... catchAll __typename } }

Every fragment has a } added into it causing the issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions