Create a GraphQL HTTP server with any HTTP web framework that supports connect styled middleware, including Connect itself, Express and Restify. This module includes a TypeScript declaration file to enable auto complete in compatible editors and type information for TypeScript projects. Use .get or .post (or both) rather than .use to configure your route handler. If you want to show GraphiQL in the browser, set graphiql, true on your .get handler. An optional function for adding additional metadata to the GraphQL response as a key-value object is provided. The result will be added to the "extensions" field in the resulting JSON. This is often a useful place to add development time metadata such as the runtime of a query or the amount of resources consumed. This may be an async function. The function is given one object as an argument: { document, variables, operationName, result, context }.

Features

  • In addition to an object defining each option, options can also be provided as a function
  • Once installed at a path, express-graphql will accept requests with specific parameters
  • GraphQL will first look for each parameter in the query string of a URL
  • Combine with other express middleware
  • The GraphQL response allows for adding additional information in a response to a GraphQL query
  • GraphQL's validation phase checks the query to ensure that it can be successfully executed against the schema

Project Samples

Project Activity

See All Activity >

License

MIT License
You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of GraphQL HTTP Server Middleware!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript HTTP Servers, TypeScript Web Development Frameworks

Registered

2021-09-10