---
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

<table><thead><tr><th>

Constructor


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[(constructor)(options, parent)](./graphql.graphqlserver._constructor_.md)


</td><td>


</td><td>

Constructs a new instance of the `GraphQLServer` class


</td></tr>
</tbody></table>

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[expressApp](./graphql.graphqlserver.expressapp.md)


</td><td>

`readonly`


</td><td>

express.Application


</td><td>


</td></tr>
<tr><td>

[httpServer?](./graphql.graphqlserver.httpserver.md)


</td><td>

`readonly`


</td><td>

[HttpServer](./http-server.httpserver.md)


</td><td>

_(Optional)_


</td></tr>
<tr><td>

[listening](./graphql.graphqlserver.listening.md)


</td><td>

`readonly`


</td><td>

boolean


</td><td>

Is the GraphQL listening


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[exportGraphQLSchema(outFile, log)](./graphql.graphqlserver.exportgraphqlschema.md)


</td><td>


</td><td>


</td></tr>
<tr><td>

[getMiddlewareList()](./graphql.graphqlserver.getmiddlewarelist.md)


</td><td>


</td><td>

Get a list of middleware


</td></tr>
<tr><td>

[getResolverClasses()](./graphql.graphqlserver.getresolverclasses.md)


</td><td>


</td><td>

Get a list of resolver classes


</td></tr>
<tr><td>

[getSchema()](./graphql.graphqlserver.getschema.md)


</td><td>


</td><td>


</td></tr>
<tr><td>

[middleware(middleware)](./graphql.graphqlserver.middleware.md)


</td><td>


</td><td>

Register a GraphQL middleware


</td></tr>
<tr><td>

[resolver(resolverClass, nameOrOptions)](./graphql.graphqlserver.resolver.md)


</td><td>


</td><td>

Register a GraphQL resolver class


</td></tr>
<tr><td>

[start()](./graphql.graphqlserver.start.md)


</td><td>


</td><td>


</td></tr>
<tr><td>

[stop()](./graphql.graphqlserver.stop.md)


</td><td>


</td><td>


</td></tr>
</tbody></table>


