question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JSON Schema doesn't allow `headers` for `schema`

See original GitHub issue

Describe the bug According to the documentation, you can pass headers to a schema url - and the feature itself actually works. It’s just that the provided json schema throws a validation error because it expects schema to either be a string or an array of strings

To Reproduce set schema to

schema:
  - http://localhost:3000/graphql:
      headers:
        Authorization: foo

yaml schema validation against https://unpkg.com/graphql-config@4.0.1/config-schema.json will report the issue as follows:

image

Expected behavior the documented format should be allowed in the json schema

Environment:

  • OS: MacOS 11.5.2
  • GraphQL Config Version: 4.0.1
  • NodeJS: 16.9.1

Additional context

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:5

github_iconTop GitHub Comments

5reactions
B2o5Tcommented, Mar 31, 2022

@benkroeger @paleite @zifeo @kevinalh @illarionvk @BasixKOR @frehner @franzwilhelm

Hey guys, sorry for a long time in fixing this problem. This problem was finally solved in the alpha version graphql-config@4.3.0-alpha-b9eff39.0.

I mentioned all of you because you had this problem, so you can test it on your configs, and maybe you have some suggestions for the next major of graphql-config? Please leave it in https://github.com/kamilkisiela/graphql-config/issues/626

1reaction
B2o5Tcommented, Apr 5, 2022

@BasixKOR thanks, available in graphql-config@4.3.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to have a header/body json schema structure and ...
I am trying to find a json schema which should act as a "envelope" for all other schemas in the system. It should...
Read more >
Defining HTTP Headers in hyperschema · Issue #201 - GitHub
I'd like to validate HTTP headers with hyperschema, ... JSON Schema tells you how to interpret JSON documents, it doesn't tell you how...
Read more >
A Vocabulary for Structural Validation of JSON - JSON Schema
Validation of Numeric Instances. The JSON specification allows numbers with arbitrary precision, and JSON Schema does not add any such bounds.
Read more >
Getting Started Step-By-Step - JSON Schema
To start a schema definition, let's begin with a basic JSON schema. We start with four properties called keywords which are expressed as...
Read more >
A Vocabulary for Structural Validation of JSON - JSON Schema
JSON Schema (application/schema+json) has several purposes, one of which is JSON instance validation. This document specifies a vocabulary for JSON Schema ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found