Skip to content

Commit

Permalink
Merge pull request #60 from oslabs-beta/master
Browse files Browse the repository at this point in the history
graphQL playground update
  • Loading branch information
meekle authored Aug 18, 2021
2 parents 4778d16 + 18f99e7 commit 2968020
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Obsidian.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,16 @@ export async function ObsidianRouter<T>({
const { request, response } = ctx;
if (usePlayground) {
const prefersHTML = request.accepts('text/html');

const optionsObj:any = {
'schema.polling.enable': false, // enables automatic schema polling
}

if (prefersHTML) {

const playground = renderPlaygroundPage({
endpoint: request.url.origin + path,
subscriptionEndpoint: request.url.origin,
settings : optionsObj
});
response.status = 200;
response.body = playground;
Expand Down

0 comments on commit 2968020

Please sign in to comment.