@graphql-inspector/loaders
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -25,4 +25,4 @@ 'use strict'; | ||
} | ||
loadSchema(pointer, options = {}, enableApolloFederation) { | ||
return load.loadSchema(pointer, Object.assign(Object.assign({ loaders: this.loaders }, options), (enableApolloFederation | ||
loadSchema(pointer, options = {}, enableApolloFederation, enableAWS) { | ||
return load.loadSchema(pointer, Object.assign(Object.assign(Object.assign({ loaders: this.loaders }, options), (enableApolloFederation | ||
? { | ||
@@ -40,2 +40,38 @@ schemas: [ | ||
} | ||
: {})), (enableAWS | ||
? { | ||
schemas: [ | ||
graphql.buildSchema(/* GraphQL */ ` | ||
scalar AWSDate | ||
scalar AWSTime | ||
scalar AWSDateTime | ||
scalar AWSTimestamp | ||
scalar AWSEmail | ||
scalar AWSJSON | ||
scalar AWSURL | ||
scalar AWSPhone | ||
scalar AWSIPAddress | ||
scalar BigInt | ||
scalar Double | ||
directive @aws_subscribe( | ||
mutations: [String!]! | ||
) on FIELD_DEFINITION | ||
directive @deprecated( | ||
reason: String | ||
) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION | ENUM | ENUM_VALUE | ||
directive @aws_auth( | ||
cognito_groups: [String!]! | ||
) on FIELD_DEFINITION | ||
directive @aws_api_key on FIELD_DEFINITION | OBJECT | ||
directive @aws_iam on FIELD_DEFINITION | OBJECT | ||
directive @aws_oidc on FIELD_DEFINITION | OBJECT | ||
directive @aws_cognito_user_pools( | ||
cognito_groups: [String!] | ||
) on FIELD_DEFINITION | OBJECT | ||
`), | ||
], | ||
} | ||
: {}))); | ||
@@ -42,0 +78,0 @@ } |
@@ -9,3 +9,3 @@ import { InspectorConfig } from '@graphql-inspector/config'; | ||
registerModule(loaderName: string): void; | ||
loadSchema(pointer: SchemaPointerSingle, options: Pick<LoadSchemaOptions, string | number> | undefined, enableApolloFederation: boolean): Promise<GraphQLSchema>; | ||
loadSchema(pointer: SchemaPointerSingle, options: Pick<LoadSchemaOptions, string | number> | undefined, enableApolloFederation: boolean, enableAWS: boolean): Promise<GraphQLSchema>; | ||
loadDocuments(pointer: SchemaPointerSingle, options?: Omit<LoadTypedefsOptions, 'loaders'>): Promise<Source[]>; | ||
@@ -12,0 +12,0 @@ } |
@@ -21,4 +21,4 @@ import { loadSchema, loadDocuments } from '@graphql-tools/load'; | ||
} | ||
loadSchema(pointer, options = {}, enableApolloFederation) { | ||
return loadSchema(pointer, Object.assign(Object.assign({ loaders: this.loaders }, options), (enableApolloFederation | ||
loadSchema(pointer, options = {}, enableApolloFederation, enableAWS) { | ||
return loadSchema(pointer, Object.assign(Object.assign(Object.assign({ loaders: this.loaders }, options), (enableApolloFederation | ||
? { | ||
@@ -36,2 +36,38 @@ schemas: [ | ||
} | ||
: {})), (enableAWS | ||
? { | ||
schemas: [ | ||
buildSchema(/* GraphQL */ ` | ||
scalar AWSDate | ||
scalar AWSTime | ||
scalar AWSDateTime | ||
scalar AWSTimestamp | ||
scalar AWSEmail | ||
scalar AWSJSON | ||
scalar AWSURL | ||
scalar AWSPhone | ||
scalar AWSIPAddress | ||
scalar BigInt | ||
scalar Double | ||
directive @aws_subscribe( | ||
mutations: [String!]! | ||
) on FIELD_DEFINITION | ||
directive @deprecated( | ||
reason: String | ||
) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION | ENUM | ENUM_VALUE | ||
directive @aws_auth( | ||
cognito_groups: [String!]! | ||
) on FIELD_DEFINITION | ||
directive @aws_api_key on FIELD_DEFINITION | OBJECT | ||
directive @aws_iam on FIELD_DEFINITION | OBJECT | ||
directive @aws_oidc on FIELD_DEFINITION | OBJECT | ||
directive @aws_cognito_user_pools( | ||
cognito_groups: [String!] | ||
) on FIELD_DEFINITION | OBJECT | ||
`), | ||
], | ||
} | ||
: {}))); | ||
@@ -38,0 +74,0 @@ } |
{ | ||
"name": "@graphql-inspector/loaders", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Loaders in GraphQL Inspector", | ||
"sideEffects": false, | ||
"peerDependencies": { | ||
"@graphql-inspector/config": "2.3.0", | ||
"@graphql-inspector/config": "2.4.0", | ||
"@graphql-tools/utils": "^6.0.0 || ^7.0.0", | ||
@@ -9,0 +9,0 @@ "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
18218
182