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

Allow for easier template overrides in graphiql #863

Merged

Conversation

benhowes
Copy link
Contributor

Use case: I use https://pypi.org/project/django-impersonate/ to allow testing my API as various users, and it's always handy to have a header which reminds you who you're impersonating.

By making graphiql populate a div rather than body, it's easier to override the template with additional content. Currently graphiql replaces all the content in body meaning any other content you add is also removed.

Copy link
Member

@jkimbo jkimbo left a comment

Choose a reason for hiding this comment

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

Thanks @benhowes this makes sense. Small change but otherwise lets get this merged.

graphene_django/templates/graphene/graphiql.html Outdated Show resolved Hide resolved
graphene_django/static/graphene_django/graphiql.js Outdated Show resolved Hide resolved
Co-Authored-By: Jonathan Kim <jkimbo@gmail.com>
@benhowes
Copy link
Contributor Author

@jkimbo no problem with that at all :)

@benhowes
Copy link
Contributor Author

Thanks @jkimbo! Sorry I forgot to update the CSS when copying changes from my overrides!

@jkimbo
Copy link
Member

jkimbo commented Jan 30, 2020

No worries! Thanks for the contribution anyway @benhowes

@jkimbo jkimbo merged commit 6b8c5bd into graphql-python:master Feb 7, 2020
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.

None yet

3 participants