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

Problems with query parsing #45

Open
ET-Torsten opened this issue Mar 8, 2023 · 0 comments
Open

Problems with query parsing #45

ET-Torsten opened this issue Mar 8, 2023 · 0 comments

Comments

@ET-Torsten
Copy link

We try to use gbox as a reverse proxy in between a headless pimcore graphql instance and a React frontend. We get errors from gbox for queries that work perfectly fine on the normal backend. It seems like the query parser within gbox is the one that throws this error even before the query is sent to the backend. The error reported is:

internal: json: error calling MarshalJSON for type json.RawMessage: invalid character 'c' looking for beginning of value

The Query we are sending is:

query getMixedQuery($offset: Int,  $orderKey: String, $tags: [Int], $tagCondition: String, $filter: String) {
  mixedFeed(offset: $offset, perPage: 1, orderKey: $orderKey, tags: $tags, tagCondition: $tagCondition, filter: $filter) {
    totalCount
    edges {
      __typename
      ...PostFragment
    }
    __typename
  }
}
fragment PostFragment on object_TribelloPost {
  id
  description
  popularity
  postType
  likesCount
  commentsCount
  dateTime
  thumbnail {
    ... on asset {
      fullpath(thumbnail: "content")
      mimetype
      __typename
    }
    __typename
  }
  urlInput {
    path
    __typename
  }

  headline
  images {
    ... on asset {
      fullpath(thumbnail: "content")
      mimetype
      __typename
    }
    __typename
  }
  
  __typename
}

It seems like the parts fullpath(thumbnail: "content") are the ones triggering the error. While it works perfectly fine as long as there is only one thumbnail query, as soon as we add the second one the error comes up.

Any suggestions how we can solve the problem (except stripping out the thumbnail queries ;) )
If this question should not be here as we are not even sure that it is a bug on gbox, feel free to close the issue.

Thanks

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