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
Your top-rated shield against malware and online scams | Avast Free Antivirus Icon
Your top-rated shield against malware and online scams | Avast Free Antivirus

Browse and email in peace, supported by clever AI

Our antivirus software scans for security and performance issues and helps you to fix them instantly. It also protects you in real time by analyzing unknown files before they reach your desktop PC or laptop — all for free.
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