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

In the new version BatchEntityFetch stopped working adequately with some variation of composite key/resolvable: false/sharable #1184

Open
flymedllva opened this issue Sep 18, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@flymedllva
Copy link
Contributor

Component(s)

router

Component version

0.110.1

wgc version

0.64.1

controlplane version

router version

0.110.1

What happened?

Description

In the new version BatchEntityFetch stopped working adequately with some variation of composite keys, resolvable false, sharable

Steps to Reproduce

Use the schema I sent you in the mail
#959 (comment)

Run Query:

query TestidentificationReports {
  identificationReports(
    filter: {
      idIn: "123456789"
    }
    page: 1
    perPage: 1
    sort: ORDER_CREATED_AT
    sortDirection: DESC
  ) {
    items {
      event {
        documents {
          document {
            payeeAmount
          }
        }
      }
    }
  }
}

Expected Result

Working Query as in the old version of cosmo or apollo.

Actual Result

{
  "message": "expected at least one definition, found }",
  "extensions": {
    "code": "GRAPHQL_PARSE_FAILED"
  }
}

Also, the Query Plan does not always work, probably for the same reason
Sometimes subgraphs from cosmo receive broken JSONs

By doing a variation Query I achieved a working plan and saw there this
Screenshot 2024-09-18 at 11 11 00

Environment information

Environment

OS: (e.g., "Ubuntu 20.04") macOS
Package Manager: pnpm, npm, yarn, etc pnpm
Compiler(if manually compiled): (e.g., "go 14.2") go version go1.22.5 darwin/arm64

Router configuration

version: "1"

# General router options
graph:
  token: ""

log_level: "info"
listen_addr: "localhost:3002"
playground_enabled: true
introspection_enabled: true
json_log: true
shutdown_delay: 15s
grace_period: 20s
poll_interval: 10s
health_check_path: "/health"
readiness_check_path: "/health/ready"
liveness_check_path: "/health/live"
router_config_path: "config.json"

cors:
  allow_origins: ["*"]
  allow_methods:
    - HEAD
    - GET
    - POST
  allow_headers:
    - Origin
    - Content-Length
    - Content-Type
  allow_credentials: true

# Config for custom modules   
# See "https://cosmo-docs.wundergraph.com/router/custom-modules" for more information   
modules:
  myModule:
    # Arbitrary values, unmarshalled by the module
    value: 1

Router execution config

No response

Log output

\nDownstream errors:\n1. Subgraph error with Message: expected at least one definition, found }, Extension Code: GRAPHQL_PARSE_FAILED.

Additional context

No response

@flymedllva flymedllva added the bug Something isn't working label Sep 18, 2024
Copy link

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible.
The roadmap is driven by our customers and we have to prioritize issues that are important to them.
You can influence the priority by becoming a customer. Please contact us here.

@Aenimus
Copy link
Member

Aenimus commented Sep 18, 2024

Hi @flymedllva,

Which version appears to break this? What is the last working version?

Thanks

@flymedllva
Copy link
Contributor Author

flymedllva commented Sep 19, 2024

@Aenimus

I tried different versions of the router and got the following

router@0.111.1 BROKEN
router@0.107.4 BROKEN

e13c021 BROKEN
0fe2cba BROKEN

router@0.107.3 and down OK

d219a6e OK

router@0.107.2 and down OK
router@0.107.1 and down OK

I.e., this MR broke download: #1092

@Aenimus
Copy link
Member

Aenimus commented Sep 19, 2024

Hi @flymedllva

Please provide the query plans from the working version and non-working versions.

If this information is sensitive, please join our community Discord, ping me, and we'll open a private correspondence where you can share safely.

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

2 participants