Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partially address NASA-AMMOS/aerie#1210.
x-hasura-role: viewer
andAuthorization
header. It also sets the changes the default theme fromlight
todracula
.Instructions:
altair-graphql-plugin-graphql-explorer
plugin. Allow this.pre-request
tab and set your username/password.Refresh Docs
icon directly to the left of theDocs
button (two to the left ofSend Request
)Your page should now look like this:
Things to note:
token
name instead of potentially clashing with the UI foruser
await altair.storage.get("token_exp")
from the lineconst tokenExpiry = await altair.storage.get("token_exp") || 0;
to force it to refreshDocs
The "How to Interact with the API Playground" docs will need to be updated. (Docs ticket here)
Future Work
If a login service is added to this endpoint, similar to the UI, then the script can be updated to no longer require users to put their user-pass in the clear every time they open a new window. This means that users will have the correct headers automatically for the Explorer window.
We may want to expose what the role set by default for the
x-hasura-role
header is via an environment variable.