---
lang: en
title: 'API docs: graphql.graphqlserver'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/extensions/graphql
permalink: /doc/en/lb4/apidocs.graphql.graphqlserver.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/graphql](./graphql.md) &gt; [GraphQLServer](./graphql.graphqlserver.md)

## GraphQLServer class

GraphQL Server

**Signature:**

```typescript
export declare class GraphQLServer extends Context implements Server 
```
**Extends:** [Context](./context.context.md)

**Implements:** [Server](./core.server.md)

## Constructors

|  Constructor | Modifiers | Description |
|  --- | --- | --- |
|  [(constructor)(options, parent)](./graphql.graphqlserver._constructor_.md) |  | Constructs a new instance of the <code>GraphQLServer</code> class |

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [expressApp](./graphql.graphqlserver.expressapp.md) | <code>readonly</code> | express.Application |  |
|  [httpServer?](./graphql.graphqlserver.httpserver.md) | <code>readonly</code> | [HttpServer](./http-server.httpserver.md) | _(Optional)_ |
|  [listening](./graphql.graphqlserver.listening.md) | <code>readonly</code> | boolean | Is the GraphQL listening |

## Methods

|  Method | Modifiers | Description |
|  --- | --- | --- |
|  [exportGraphQLSchema(outFile, log)](./graphql.graphqlserver.exportgraphqlschema.md) |  |  |
|  [getMiddlewareList()](./graphql.graphqlserver.getmiddlewarelist.md) |  | Get a list of middleware |
|  [getResolverClasses()](./graphql.graphqlserver.getresolverclasses.md) |  | Get a list of resolver classes |
|  [middleware(middleware)](./graphql.graphqlserver.middleware.md) |  | Register a GraphQL middleware |
|  [resolver(resolverClass, nameOrOptions)](./graphql.graphqlserver.resolver.md) |  | Register a GraphQL resolver class |
|  [start()](./graphql.graphqlserver.start.md) |  |  |
|  [stop()](./graphql.graphqlserver.stop.md) |  |  |


