1.0.0-beta.1 • Published 2 years ago

@graphqland/http-graphql-playground v1.0.0-beta.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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:

CodeContentHeaders
200text/htmlcontent-type, vary
405-allow
406text/plaincontent-type, vary

License

Copyright © 2022-present graphqland.

Released under the MIT license