Socket
Book a DemoInstallSign in
Socket

@harperdb/apollo

Package Overview
Dependencies
Maintainers
10
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@harperdb/apollo

A HarperDB Component for running Apollo apps.

1.2.0
latest
npmnpm
Version published
Maintainers
10
Created
Source

@harperdb/apollo

A HarperDB Component for running and developing Apollo GraphQL backend services.

NPM Version

Most Apollo features are supported as this component relies on the ApolloServer provided by @apollo/server.

If you don't know where to get started, check out the apollo-example starter project.

Options

Required

files: string

Specifies the directory that contains your configuration files.

Optional

cache: string

Specify a path to a custom Apollo cache implementation.

Must be set to a path of a JavaScript file with a default export of an Apollo cache backend implementing the KeyValueCache interface.

For example:

class CustomCache {
	// ...
}

export default CustomCache;

port: number

Specify a port for the Apollo server. Defaults to the HarperDB default port (generally 9926).

resolvers: string

Specify a path to the Apollo resolvers JavaScript file.

Must be set to a singular path of a JavaScript file containing a default export of Apollo resolver functions.

For example:

const resolvers = {
	Query: {
		dog: //...
	},
}

export default resolvers;

plugins: string

Specify a path to an Apollo plugins JavaScript file.

Must be set to a singular path of a JavaScript file containing a default export of Apollo plugins.

For example:

// Example setting custom response headers
const customPlugin = {
	async requestDidStart() {
		return {
			async willSendResponse(requestContext) {
				const { response } = requestContext;
				response.http.headers.set('x-foo', 'bar');
			},
		};
	},
};

const plugins = [customPlugin];

export default plugins;

schemas: string

Specify a glob path to Apollo schema files.

Can be a singular path or a glob pattern. All schemas will be concatenated together and passed to the Apollo server.

For example, if all schemas are located in src/schemas/, the setting here would be ./src/schemas/*.graphql

securePort: number

Specify a secure port for the Apollo server. Defaults to the HarperDB default secure port.

introspection: boolean

Enable/disable GraphQL introspection

FAQs

Package last updated on 26 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.