mirror of
https://github.com/vale981/apollo-server
synced 2025-03-05 09:41:40 -05:00
core: add Scalar Upload with schema is made execuable
This commit is contained in:
parent
1f9f307d55
commit
439ec44135
1 changed files with 9 additions and 1 deletions
|
@ -40,6 +40,8 @@ import {
|
|||
SubscriptionServerOptions,
|
||||
} from './types';
|
||||
|
||||
import { gql } from './index';
|
||||
|
||||
const NoIntrospection = (context: ValidationContext) => ({
|
||||
Field(node: FieldDefinitionNode) {
|
||||
if (node.name.value === '__schema' || node.name.value === '__type') {
|
||||
|
@ -125,7 +127,13 @@ export class ApolloServerBase {
|
|||
this.schema = schema
|
||||
? schema
|
||||
: makeExecutableSchema({
|
||||
typeDefs,
|
||||
//we add in the upload scalar, so that schemas that don't include it
|
||||
//won't error when we makeExecutableSchema
|
||||
typeDefs: [
|
||||
gql`
|
||||
scalar Upload
|
||||
`,
|
||||
].concat(typeDefs),
|
||||
schemaDirectives,
|
||||
resolvers,
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue