cosmo icon indicating copy to clipboard operation
cosmo copied to clipboard

Introspection ofType.field failed

Open flymedllva opened this issue 1 year ago • 2 comments

Component(s)

router

Component version

v0.99.1

wgc version

0.58.5

controlplane version

router version

v0.99.1

What happened?

Description

When introspection is requested, it falls on ofType.field

Steps to Reproduce

Use the schema I sent you in the mail https://github.com/wundergraph/cosmo/issues/959#issuecomment-2258868305

Run Query:

query MutationsSchema {
  __schema {
    mutationType {
      fields {
        description
        name
        type {
          ofType {
            name
            fields {
              name
              description
            }
          }
        }
      }
    }
  }
}

Expected Result

new cosmo

{
  "errors": [
    {
      "message": "Failed to fetch from Subgraph 'introspection__type__fields' at Path '[email protected]', Reason: no data or errors in response."
    }
  ]
}

old cosmo

{
  "errors": [
    {
      "message": "Unexpected end of JSON input",
      "stack": "SyntaxError: Unexpected end of JSON input"
    }
  ]
}

Actual Result

Work Query

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:
  name: "production"
  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
  max_age_minutes: 5m

# 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

No response

Additional context

No response

flymedllva avatar Aug 01 '24 12:08 flymedllva