From 6a12d18a32f8f77d1898d495761d2a753d1ab21f Mon Sep 17 00:00:00 2001 From: David McAfee Date: Mon, 11 Sep 2023 10:26:26 -0700 Subject: [PATCH] update singleton type config --- packages/core/src/singleton/API/types.ts | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/packages/core/src/singleton/API/types.ts b/packages/core/src/singleton/API/types.ts index 4e81c2a966a..282f29d2d2e 100644 --- a/packages/core/src/singleton/API/types.ts +++ b/packages/core/src/singleton/API/types.ts @@ -1,23 +1,10 @@ -// TODO V6 -/** - * exports file - * auth modes - * headers should be on second param - */ - -// import { DocumentNode } from 'graphql'; -// TODO: update as this no longer exists: -// import { GRAPHQL_AUTH_MODE } from '@aws-amplify/auth'; +// TODO V6: dependency not yet added. +// import type { ModelIntrospectionSchema as InternalModelIntrospectionSchema } from '@aws-amplify/appsync-modelgen-plugin'; -// See packages/api-graphql/src/types/index.ts -// custom headers, dynamic, etc. export type LibraryAPIOptions = { AppSync: { - // query: string | DocumentNode; query: string; variables?: object; - // TODO V6 - // authMode?: keyof typeof GRAPHQL_AUTH_MODE; authMode?: any; authToken?: string; /** @@ -33,6 +20,9 @@ export type APIConfig = { defaultAuthMode: GraphQLAuthMode; region: string; endpoint: string; + // TODO: switch this when dependency is added: + // modelIntrospectionSchema: InternalModelIntrospectionSchema; + modelIntrospectionSchema: any; }; }; @@ -42,7 +32,8 @@ export type GraphQLAuthMode = | { type: 'iam' } | { type: 'lambda' } | { type: 'custom' }; -// TODO V6 + +// Francisco's type draft for reference: // import type { ModelIntrospectionSchema as InternalModelIntrospectionSchema } from '@aws-amplify/appsync-modelgen-plugin'; // import { REGION_SET_PARAM } from '../../clients/middleware/signing/signer/signatureV4/constants';