Skip to content

Allow costume accept headers for GraphQL Endpoint. - #1001

Merged
acrobat merged 4 commits into
KnpLabs:masterfrom
Necmttn:patch-1
Apr 30, 2021
Merged

acrobat merged 4 commits into
KnpLabs:masterfrom
Necmttn:patch-1

Conversation

@Necmttn

@Necmttn Necmttn commented Apr 29, 2021

Copy link
Copy Markdown
Contributor

Github has multiple different accept headers for different purposes. Currently, there's no easy way to add/remove the Accept header to the client.

ref: https://docs.github.com/en/graphql/overview/schema-previews

Github has multiple different accept headers for different purposes.  Currently, there's no easy way to add/remove the `Accept` header to the client. 

ref: https://docs.github.com/en/graphql/overview/schema-previews

@acrobat acrobat left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Necmttn the change looks good! Can you just add an example (so users know this "feature" exists) to switch the accept header in the graphql docs? Thanks!

See: https://github.com/KnpLabs/php-github-api/blob/master/doc/graphql.md

@Necmttn

Necmttn commented Apr 29, 2021

Copy link
Copy Markdown
Contributor Author

@acrobat updated 🍻

Comment thread lib/Github/Api/GraphQL.php Resolved
Comment thread lib/Github/Api/GraphQL.php Resolved
Comment thread lib/Github/Api/GraphQL.php Resolved
Necmttn and others added 2 commits April 30, 2021 11:22
Co-authored-by: Markus Staab <maggus.staab@googlemail.com>
Co-authored-by: Jeroen Thora <jeroenthora@gmail.com>
@acrobat
acrobat merged commit 2e635fc into KnpLabs:master Apr 30, 2021
@acrobat

acrobat commented Apr 30, 2021 •

Copy link
Copy Markdown
Collaborator

Thanks @Necmttn! And congrats on your first contribution! 🎉

@Necmttn
Necmttn deleted the patch-1 branch May 24, 2021 15:45
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