Skip to content

Commit

Permalink
Merge pull request #16 from oslabs-beta/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Olivia-code authored Aug 18, 2021
2 parents 68a16da + faa8dfa commit 18f99e7
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 18f99e7

Please sign in to comment.