Skip to content

HTTP request for graphql-playground with standard Request and Response

License

Notifications You must be signed in to change notification settings

graphqland/http-graphql-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http-graphql-playground

deno land deno doc npm GitHub

HTTP request for graphql-playground with standard Request and Response

Usage

  • createHandler - Create HTTP request handler for graphql-playground.
  • validateRequest - Validate the request is valid GraphQL playground request or not.
import { createHandler } from "https://deno.land/x/http_graphql_playground@$VERSION/mod.ts";
import { serve } from "https://deno.land/std@$VERSION/http/mod.ts";

const handler = createHandler({
  endpoint: "/graphql",
});
await serve(handler);

Spec

The response includes the following response status codes and headers:

Code Content Headers
200 text/html content-type, vary
405 - allow
406 text/plain content-type, vary

License

Copyright © 2022-present graphqland.

Released under the MIT license