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
Other Useful Business Software
Get Avast Free Antivirus with 24/7 AI-powered online scam detection Icon
Get Avast Free Antivirus with 24/7 AI-powered online scam detection

Get protection for today’s online threats. Free.

Award-winning antivirus protection, as well as protection against online scams, dangerous Wi-Fi connections, hacked accounts, and ransomware. It includes Avast Assistant, your built-in AI partner, which gives you help with suspicious online messages, offers, and more.
Free Download
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