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

gql.tada doctor/check cannot handle headers in schema object #221

Closed
3 tasks done
KammererTob opened this issue Apr 16, 2024 · 0 comments · Fixed by #222
Closed
3 tasks done

gql.tada doctor/check cannot handle headers in schema object #221

KammererTob opened this issue Apr 16, 2024 · 0 comments · Fixed by #222

Comments

@KammererTob
Copy link

Describe the bug

gql.tada CLI commands which parse the config containing headers in the schema object fail (examples are doctor and check).

Reproduction:

  1. New Project with those two files.
    package.json:
{
  "name": "gql-tada-bug",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "gql.tada": "^1.5.1",
    "typescript": "^5.4.5"
  },
  "devDependencies": {
    "@0no-co/graphqlsp": "^1.10.1"
  }
}

tsconfig.json (copied from the documentation):

{
  "compilerOptions": {
    "plugins": [ 
      {
        "name": "@0no-co/graphqlsp",
        "schema": {
          "url": "http://localhost:4321/graphql",
          "headers": {
            "Accept": "application/graphql-response+json"
          }
        }
      }
    ]
  }
}
  1. yarn / npm install
  2. gql.tada doctor

Leads to the following error:

⚠ Error
The plugin configuration for "@0no-co/graphqlsp" seems to be invalid.
┗ Configuration contains a schema.headers property, but it's not an object

Reproduction

No response

gql.tada version

gql.tada v1.5.1

Validations

  • I can confirm that this is a bug report, and not a feature request, RFC, question, or discussion, for which GitHub Discussions should be used
  • Read the docs.
  • Follow our Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant