Skip to content

graphql-composer does not handle nesting when #69

@mikaelkaron

Description

@mikaelkaron

This query:

{
  artists {
    id
    tags(where: { id: { eq: "1" } }) {
      id
    }
  }
}

works fine if run directly on the service:

{
  "data": {
    "artists": [
      {
        "id": "101",
        "tags": [
          {
            "id": "1"
          }
        ]
      },
      {
        "id": "102",
        "tags": []
      },
      {
        "id": "201",
        "tags": []
      },
      {
        "id": "301",
        "tags": []
      },
      {
        "id": "401",
        "tags": []
      }
    ]
  }
}

but fails if executed on the composer:

{
  "data": {
    "artists": [
      {
        "id": "101",
        "tags": [
          {
            "id": "1"
          }
        ]
      },
      {
        "id": "102",
        "tags": [
          {
            "id": "2"
          }
        ]
      },
      {
        "id": "201",
        "tags": []
      },
      {
        "id": "301",
        "tags": []
      },
      {
        "id": "401",
        "tags": []
      }
    ]
  }
}

reproducer repo: https://github.com/mikaelkaron/platformatic-graphql-composer/tree/bug/deep-where

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions