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

DeepClient Select Error: field "_eq" not found in type: 'links_bool_exp' #313

Open
FreePhoenix888 opened this issue Mar 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@FreePhoenix888
Copy link
Member

Error

Uncaught Error: DeepClient Select Error: field "_eq" not found in type: 'links_bool_exp'
    at DeepClient.eval (client.js:394:1)
    at Generator.throw (<anonymous>)
    at rejected (client.js:5:42)

Select request

await deep.select({
    _or: [
      {
        up: {
          tree_id: await deep.id('@deep-foundation/core', 'containTree'),
          parent_id: deep.linkId,
          link: { type_id: await deep.id('@deep-foundation/chatgpt-azure-discord-bot', 'BotToken') }
        }
      },
      {
        type_id: await deep.id('@deep-foundation/chatgpt-azure-discord-bot', 'BotToken'),
        in: {
          type_id: await deep.id('@deep-foundation/chatgpt-azure-discord-bot', 'UsesBotToken'),
          from: deep.linkId
        },
      }
    ]
  })

// or

  await deep.select({
    _or: [
      {
        up: {
          tree_id: { _eq: await deep.id('@deep-foundation/core', 'containTree') },
          parent: { id: { _eq: deep.linkId } },
          link: { type_id: { _eq: await deep.id('@deep-foundation/chatgpt-azure-discord-bot', 'BotToken') } }
        }
      },
      {
        type_id: await deep.id('@deep-foundation/chatgpt-azure-discord-bot', 'BotToken'),
        in: {
          type_id: await deep.id('@deep-foundation/chatgpt-azure-discord-bot', 'UsesBotToken'),
          from: deep.linkId
        },
      }
    ]
  })

Gql code from network tab

{"operationName":"SELECT","variables":{"where0":{"in":{"type_id":{"_eq":3},"string":{"value":{"_eq":"BotToken"}},"from":{"type_id":{"_eq":2},"string":{"value":{"_eq":"@deep-foundation/chatgpt-azure-discord-bot"}}}}}},"query":"query SELECT($distinct_on0: [links_select_column!], $limit0: Int, $offset0: Int, $order_by0: [links_order_by!], $where0: links_bool_exp!) {\n  q0: links(\n    distinct_on: $distinct_on0\n    limit: $limit0\n    offset: $offset0\n    order_by: $order_by0\n    where: $where0\n  ) {\n    id\n    type_id\n    from_id\n    to_id\n    value\n    __typename\n  }\n}\n"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant