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

Make it possible to pass UI headers to GraphiQL #2793

Merged

Conversation

marcusthelin
Copy link
Contributor

@marcusthelin marcusthelin commented Sep 14, 2023

#2740 made it possible to pass headers to the playground, but this doesn't cover all use cases. Instead of just being able to set the GraphiQL's fetcher headers, it would be nice to also be able to set default headers in the UI.

These changes very much mimics what was done in #2740.

@coveralls
Copy link

coveralls commented Sep 14, 2023

Coverage Status

coverage: 75.706% (-0.04%) from 75.748% when pulling 6d1b467 on marcusthelin:default-ui-headers-support into fceb331 on 99designs:master.

@marcusthelin
Copy link
Contributor Author

@StevenACoffman I'm not sure why federation test failed 😅

@StevenACoffman
Copy link
Collaborator

Just a transient error... I retried and it worked fine. Not sure why it is flaky though.

@marcusthelin
Copy link
Contributor Author

Great! Feel free to review

@StevenACoffman StevenACoffman merged commit 625ca2e into 99designs:master Sep 14, 2023
17 checks passed
@marcusthelin marcusthelin deleted the default-ui-headers-support branch September 14, 2023 19:23
github-merge-queue bot referenced this pull request in infratographer/x Sep 28, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/99designs/gqlgen](https://github.com/99designs/gqlgen) |
require | patch | `v0.17.36` -> `v0.17.38` |

---

### Release Notes

<details>
<summary>99designs/gqlgen (github.com/99designs/gqlgen)</summary>

###
[`v0.17.38`](https://github.com/99designs/gqlgen/releases/tag/v0.17.38)

[Compare
Source](https://github.com/99designs/gqlgen/compare/v0.17.37...v0.17.38)

#### What's Changed

- Ability to use forceGenerate and extraFields together by
[@&#8203;atzedus](https://github.com/atzedus) in
[https://github.com/99designs/gqlgen/pull/2788](https://github.com/99designs/gqlgen/pull/2788)
- Add new changelog by
[@&#8203;StevenACoffman](https://github.com/StevenACoffman) in
[https://github.com/99designs/gqlgen/pull/2787](https://github.com/99designs/gqlgen/pull/2787)
- Fix rand int docs link in Getting Started by
[@&#8203;stevenschobert](https://github.com/stevenschobert) in
[https://github.com/99designs/gqlgen/pull/2789](https://github.com/99designs/gqlgen/pull/2789)
- Make it possible to pass UI headers to GraphiQL by
[@&#8203;marcusthelin](https://github.com/marcusthelin) in
[https://github.com/99designs/gqlgen/pull/2793](https://github.com/99designs/gqlgen/pull/2793)
- Return `null` instead of zero value uuid by
[@&#8203;0x221A](https://github.com/0x221A) in
[https://github.com/99designs/gqlgen/pull/2794](https://github.com/99designs/gqlgen/pull/2794)
- Update gqlparser to 2.5.10 by
[@&#8203;StevenACoffman](https://github.com/StevenACoffman) in
[https://github.com/99designs/gqlgen/pull/2798](https://github.com/99designs/gqlgen/pull/2798)

#### New Contributors

- [@&#8203;stevenschobert](https://github.com/stevenschobert) made
their first contribution in
[https://github.com/99designs/gqlgen/pull/2789](https://github.com/99designs/gqlgen/pull/2789)
- [@&#8203;marcusthelin](https://github.com/marcusthelin) made their
first contribution in
[https://github.com/99designs/gqlgen/pull/2793](https://github.com/99designs/gqlgen/pull/2793)
- [@&#8203;0x221A](https://github.com/0x221A) made their first
contribution in
[https://github.com/99designs/gqlgen/pull/2794](https://github.com/99designs/gqlgen/pull/2794)

**Full Changelog**:
99designs/gqlgen@v0.17.37...v0.17.38

###
[`v0.17.37`](https://github.com/99designs/gqlgen/blob/HEAD/CHANGELOG.md#v01737---2023-09-08)

[Compare
Source](https://github.com/99designs/gqlgen/compare/v0.17.36...v0.17.37)

- <a
href="https://github.com/99designs/gqlgen/commit/ccae370e96cbca6ce5deaabf28a6d57e3b181b3b"><tt>[`ccae370`](https://github.com/99designs/gqlgen/commit/ccae370e)</tt></a>
release v0.17.37

- <a
href="https://github.com/99designs/gqlgen/commit/6505f8be0d99593376d6c9a0dea00af5e3c018ea"><tt>[`6505f8b`](https://github.com/99designs/gqlgen/commit/6505f8be)</tt></a>
Update gqlparser (<a
href="https://github.com/99designs/gqlgen/pull/2785">[#&#8203;2785](https://github.com/99designs/gqlgen/issues/2785)</a>)

<dl><dd><details><summary><a
href="https://github.com/99designs/gqlgen/commit/153ec470d993a39c1656fc45432740f1d3dd10ea"><tt>153ec470</tt></a>
add uuid type (<a
href="https://github.com/99designs/gqlgen/pull/2751">#&#8203;2751</a>)
(closes <a href="https://github.com/99designs/gqlgen/issues/2749">
#&#8203;2749</a>)</summary>

-   add uuid type

-   add uuid example

-   add uuid scalar doc

-   strconv.Quote

-   Apply suggestions from code review

-   fix

***

</details></dd></dl>

<dl><dd><details><summary><a
href="https://github.com/99designs/gqlgen/commit/fa4711801c59d27db887a50e1f8393006268194e"><tt>fa471180</tt></a>
ForceGenerate parameter to
[@&#8203;goModel](https://github.com/goModel) added. (<a
href="https://github.com/99designs/gqlgen/pull/2780">#&#8203;2780</a>)</summary>

-   forceGenerate to docs added

***

</details></dd></dl>

<dl><dd><details><summary><a
href="https://github.com/99designs/gqlgen/commit/11bb9b1890fd9e5909f06feba7b2985bf09785c9"><tt>11bb9b18</tt></a>
codegen: add support for `go_build_tags` option in gqlgen.yaml (<a
href="https://github.com/99designs/gqlgen/pull/2784">#&#8203;2784</a>)</summary>

-   codegen: support go_build_tags option in gqlgen.yaml

-   chore: added test

-   docs/content: update config example

-   chore: more comment

</details></dd></dl>

<dl><dd><details><summary><a
href="https://github.com/99designs/gqlgen/commit/bee47dcf1f3edb95e7a77e612ea27d85a417b12c"><tt>bee47dcf</tt></a>
fix flaky test TestSubscriptions (<a
href="https://github.com/99designs/gqlgen/pull/2779">#&#8203;2779</a>)</summary>

-   fix flaky test TestSubscriptions

-   update other copy of the test

</details></dd></dl>

- <a
href="https://github.com/99designs/gqlgen/commit/a41f4daad66cb0c102bfa09d7bff5a057d378197"><tt>[`a41f4da`](https://github.com/99designs/gqlgen/commit/a41f4daa)</tt></a>
docs: short-lived loader (<a
href="https://github.com/99designs/gqlgen/pull/2778">[#&#8203;2778](https://github.com/99designs/gqlgen/issues/2778)</a>)

- <a
href="https://github.com/99designs/gqlgen/commit/cc4e0ba28375e0ec39c586485fa138c28e5bfcba"><tt>[`cc4e0ba`](https://github.com/99designs/gqlgen/commit/cc4e0ba2)</tt></a>
ensure HasOperationContext checks for nil (<a
href="https://github.com/99designs/gqlgen/pull/2776">[#&#8203;2776](https://github.com/99designs/gqlgen/issues/2776)</a>)

<dl><dd><details><summary><a
href="https://github.com/99designs/gqlgen/commit/a1ca220477092398efc8e587dd653f5cb967d0e9"><tt>a1ca2204</tt></a>
fix typo in TESTING.md server path (<a
href="https://github.com/99designs/gqlgen/pull/2774">#&#8203;2774</a>)</summary>

following TESTING.md instructions, I got an error:
"stat ./server/server.go: no such file or directory"

server.go path is: integration/server/cmd/integration/server.go

</details></dd></dl>

<dl><dd><details><summary><a
href="https://github.com/99designs/gqlgen/commit/1cde8c3fab65847a6e8d7f423215b786b47c19df"><tt>1cde8c3f</tt></a>
return internal types in schema introspection (<a
href="https://github.com/99designs/gqlgen/pull/2773">#&#8203;2773</a>)</summary>

according to graphql spec:

types: return the set of all named types contained within this schema.
Any named type which can be found through a field of any introspection
type must be included in this set.

source:
https://github.com/graphql/graphql-spec/blob/main/spec/Section%204%20--%20Introspection.md#the-\__schema-type

some clients libs (like HotChocolate for C#) depends on this behavior.

</details></dd></dl>

- <a
href="https://github.com/99designs/gqlgen/commit/065aea3efa27f0662eb2f62ef2dd131e153009ba"><tt>[`065aea3`](https://github.com/99designs/gqlgen/commit/065aea3e)</tt></a>
Fix gqlgen truncates tag value with colon (<a
href="https://github.com/99designs/gqlgen/pull/2759">[#&#8203;2759](https://github.com/99designs/gqlgen/issues/2759)</a>)

- <a
href="https://github.com/99designs/gqlgen/commit/d6270e4f4fd951c71ee2a2b997d7098b04e07976"><tt>[`d6270e4`](https://github.com/99designs/gqlgen/commit/d6270e4f)</tt></a>
Update subsciptions documentation to correctly close channel (<a
href="https://github.com/99designs/gqlgen/pull/2753">[#&#8203;2753](https://github.com/99designs/gqlgen/issues/2753)</a>)

- <a
href="https://github.com/99designs/gqlgen/commit/2d8673a691deffe6ddd1f4d5f013a52dc91aef91"><tt>[`2d8673a`](https://github.com/99designs/gqlgen/commit/2d8673a6)</tt></a>
Add Model references to Interface (<a
href="https://github.com/99designs/gqlgen/pull/2738">[#&#8203;2738](https://github.com/99designs/gqlgen/issues/2738)</a>)

- <a
href="https://github.com/99designs/gqlgen/commit/790d7a7571865b8b8324557e1a565f40c23217c8"><tt>[`790d7a7`](https://github.com/99designs/gqlgen/commit/790d7a75)</tt></a>
Allow GraphiQL headers to be set when creating the playground handler
(<a
href="https://github.com/99designs/gqlgen/pull/2740">[#&#8203;2740](https://github.com/99designs/gqlgen/issues/2740)</a>)
(closes <a href="https://github.com/99designs/gqlgen/issues/2739">
[#&#8203;2739](https://github.com/99designs/gqlgen/issues/2739)</a>)

- <a
href="https://github.com/99designs/gqlgen/commit/0eb95dc4315fc5f74431df03e008283cf9ec0c35"><tt>[`0eb95dc`](https://github.com/99designs/gqlgen/commit/0eb95dc4)</tt></a>
v0.17.36 postrelease bump

 <!-- end of Commits -->

<!-- end of Else -->

<!-- end of If NoteGroups -->

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/infratographer/x).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi44My4wIiwidXBkYXRlZEluVmVyIjoiMzYuOTcuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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 this pull request may close these issues.

3 participants