Skip to content

Problems with query parsing #45

@ET-Torsten

Description

@ET-Torsten

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

Metadata

Metadata

Assignees

No one assigned

    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