Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

graphiql config headers do not work in new release 12.0.0 #726

Closed
aihua5 opened this issue Sep 29, 2021 · 1 comment · Fixed by #738
Closed

graphiql config headers do not work in new release 12.0.0 #726

aihua5 opened this issue Sep 29, 2021 · 1 comment · Fixed by #738
Labels
Milestone

Comments

@aihua5
Copy link

aihua5 commented Sep 29, 2021

I upgraded the starter from 11.1.0 to 12.0.0.

Before I upgrade, I config the graphiql in application.yml

graphiql: mapping: / headers: test: test

When I post one graphql query, I can see we have one added header test:test

But after I upgrade to 12.0.0, I config the graphiql as below per new format

graphql: graphiql: enabled: true mapping: / headers: test: test

I expect I can see the added header but not.

Is there one bug for the graphiql config in appliation.yml?
Can anyone help to take a look? thanks.

@aihua5 aihua5 added the bug label Sep 29, 2021
BlasiusSecundus added a commit to BlasiusSecundus/graphql-spring-boot that referenced this issue Oct 5, 2021
BlasiusSecundus added a commit to BlasiusSecundus/graphql-spring-boot that referenced this issue Oct 5, 2021
There was some inconsistency in configuration handling. The
`GraphiQLProperties` were not used for headers and GraphiQL props.
Instead, the properties were manually loaded.

This part, however, was not updated with the starter reorganization,
and expected the variables in the old place
(`graphiql.props.variables.`).

This commit fixes this by using the props / headers from the
configuration properties.
@BlasiusSecundus
Copy link

A fix is in progress. Meanwhile, you can setup headers in the old fashioned way (before the starter reorganization):

graphiql:
  headers:
    myHeader: myHeaderValue
  props:
    variables:
      headerEditorEnabled: true

BlasiusSecundus added a commit to BlasiusSecundus/graphql-spring-boot that referenced this issue Oct 9, 2021
There was some inconsistency in configuration handling. The
`GraphiQLProperties` were not used for headers and GraphiQL props.
Instead, the properties were manually loaded.

This part, however, was not updated with the starter reorganization,
and expected the variables in the old place
(`graphiql.props.variables.`).

This commit fixes this by using the props / headers from the
configuration properties.
BlasiusSecundus added a commit to BlasiusSecundus/graphql-spring-boot that referenced this issue Oct 13, 2021
There was some inconsistency in configuration handling. The
`GraphiQLProperties` were not used for headers and GraphiQL props.
Instead, the properties were manually loaded.

This part, however, was not updated with the starter reorganization,
and expected the variables in the old place
(`graphiql.props.variables.`).

This commit fixes this by using the props / headers from the
configuration properties.
@BlasiusSecundus BlasiusSecundus linked a pull request Oct 18, 2021 that will close this issue
@oliemansm oliemansm added this to the 12.0.1 milestone Jan 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants