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
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

Build gen AI apps with an all-in-one modern database: MongoDB Atlas

MongoDB Atlas provides built-in vector search and a flexible document model so developers can build, scale, and run gen AI apps without stitching together multiple databases. From LLM integration to semantic search, Atlas simplifies your AI architecture—and it’s free to get started.
Start Free
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