Page Contents
Home > @loopback/graphql > GraphQLServer
GraphQLServer class
GraphQL Server
Signature:
export declare class GraphQLServer extends Context implements Server
Extends: Context
Implements: Server
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| [(constructor)(options, parent)](/doc/en/lb4/apidocs.graphql.graphqlserver._constructor_.html) | Constructs a new instance of the `GraphQLServer` class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| [expressApp](/doc/en/lb4/apidocs.graphql.graphqlserver.expressapp.html) | `readonly` | express.Application | |
| [httpServer?](/doc/en/lb4/apidocs.graphql.graphqlserver.httpserver.html) | `readonly` | [HttpServer](/doc/en/lb4/apidocs.http-server.httpserver.html) | _(Optional)_ |
| [listening](/doc/en/lb4/apidocs.graphql.graphqlserver.listening.html) | `readonly` | boolean | Is the GraphQL listening |
Methods
| Method | Modifiers | Description |
|---|---|---|
| [exportGraphQLSchema(outFile, log)](/doc/en/lb4/apidocs.graphql.graphqlserver.exportgraphqlschema.html) | ||
| [getMiddlewareList()](/doc/en/lb4/apidocs.graphql.graphqlserver.getmiddlewarelist.html) | Get a list of middleware | |
| [getResolverClasses()](/doc/en/lb4/apidocs.graphql.graphqlserver.getresolverclasses.html) | Get a list of resolver classes | |
| [getSchema()](/doc/en/lb4/apidocs.graphql.graphqlserver.getschema.html) | ||
| [middleware(middleware)](/doc/en/lb4/apidocs.graphql.graphqlserver.middleware.html) | Register a GraphQL middleware | |
| [resolver(resolverClass, nameOrOptions)](/doc/en/lb4/apidocs.graphql.graphqlserver.resolver.html) | Register a GraphQL resolver class | |
| [start()](/doc/en/lb4/apidocs.graphql.graphqlserver.start.html) | ||
| [stop()](/doc/en/lb4/apidocs.graphql.graphqlserver.stop.html) |