adonis-apollo
Advanced tools
Comparing version 0.17.0-pre.1677073603 to 0.17.0-pre.1677231568
@@ -5,2 +5,3 @@ /// <reference types="@adonisjs/http-server/build/adonis-typings" /> | ||
import type { ApolloServerOptions, BaseContext } from '@apollo/server'; | ||
import { ApolloServerPluginLandingPageLocalDefaultOptions, ApolloServerPluginLandingPageProductionDefaultOptions } from '@apollo/server/plugin/landingPage/default'; | ||
import type { IExecutableSchemaDefinition } from '@graphql-tools/schema'; | ||
@@ -52,2 +53,10 @@ import type { FileUpload } from 'graphql-upload/Upload.js'; | ||
apolloServer?: Omit<ApolloServerOptions<ContextType>, 'schema' | 'resolvers' | 'typeDefs' | 'gateway'>; | ||
/** | ||
* Options passed to the Apollo Server production landing page plugin. | ||
*/ | ||
apolloProductionLandingPageOptions?: ApolloServerPluginLandingPageProductionDefaultOptions; | ||
/** | ||
* Options passed to the Apollo Server local landing page plugin. | ||
*/ | ||
apolloLocalLandingPageOptions?: ApolloServerPluginLandingPageLocalDefaultOptions; | ||
context?: ContextFn<ContextType>; | ||
@@ -54,0 +63,0 @@ /** |
@@ -16,3 +16,3 @@ "use strict"; | ||
constructor(application, config, logger) { | ||
const { path: graphQLPath = '/graphql', schemas: schemasPath = 'app/Schemas', resolvers: resolversPath = 'app/Resolvers', apolloServer = {}, context = defaultContextFn, executableSchema = {}, enableUploads = false, uploadOptions, } = config; | ||
const { path: graphQLPath = '/graphql', schemas: schemasPath = 'app/Schemas', resolvers: resolversPath = 'app/Resolvers', apolloServer = {}, apolloProductionLandingPageOptions, apolloLocalLandingPageOptions, context = defaultContextFn, executableSchema = {}, enableUploads = false, uploadOptions, } = config; | ||
this.$app = application; | ||
@@ -44,2 +44,3 @@ this.$path = graphQLPath; | ||
footer: false, | ||
...apolloProductionLandingPageOptions, | ||
}) | ||
@@ -49,2 +50,3 @@ : // eslint-disable-next-line new-cap | ||
footer: false, | ||
...apolloLocalLandingPageOptions, | ||
}), | ||
@@ -85,2 +87,2 @@ ], | ||
exports.default = Ap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QUFPLElBQUksRUFBRSxDQUFDO1FBQ2hCLENBQUMsQ0FBQztJQUNKLENBQUM7SUFFTSxLQUFLO1FBQ1YsT0FBTyxJQUFJLENBQUMsYUFBYSxDQUFDLEtBQUssRUFBRSxDQUFDO0lBQ3BDLENBQUM7SUFFTSxJQUFJO1FBQ1QsT0FBTyxJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksRUFBRSxDQUFDO0lBQ25DLENBQUM7Q0FDRjtBQXZIRCwrQkF1SEMifQ== |
{ | ||
"name": "adonis-apollo", | ||
"version": "0.17.0-pre.1677073603", | ||
"version": "0.17.0-pre.1677231568", | ||
"description": "Apollo GraphQL server for AdonisJs", | ||
@@ -5,0 +5,0 @@ "main": "./lib/providers/ApolloProvider.js", |
@@ -89,3 +89,5 @@ # adonis-apollo | ||
To configure the landing page, use the `plugins` option in `config/apollo.ts`: | ||
To configure the default landing page, you can pass `apolloProductionLandingPageOptions` | ||
or `apolloLocalLandingPageOptions` to the config. Another possibility is to | ||
override the `plugins` config in `config/apollo.ts`. | ||
@@ -104,5 +106,7 @@ The default configuration is: | ||
footer: false, | ||
apolloProductionLandingPageOptions, | ||
}) | ||
: ApolloServerPluginLandingPageLocalDefault({ | ||
footer: false, | ||
apolloLocalLandingPageOptions, | ||
}), | ||
@@ -109,0 +113,0 @@ ]; |
@@ -51,2 +51,4 @@ import path from 'node:path'; | ||
apolloServer = {}, | ||
apolloProductionLandingPageOptions, | ||
apolloLocalLandingPageOptions, | ||
context = defaultContextFn as ContextFn<ContextType>, | ||
@@ -98,2 +100,3 @@ executableSchema = {}, | ||
footer: false, | ||
...apolloProductionLandingPageOptions, | ||
}) | ||
@@ -103,2 +106,3 @@ : // eslint-disable-next-line new-cap | ||
footer: false, | ||
...apolloLocalLandingPageOptions, | ||
}), | ||
@@ -105,0 +109,0 @@ ], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46152
667
147