Skip to content

Commit

Permalink
update singleton type config
Browse files Browse the repository at this point in the history
  • Loading branch information
david-mcafee committed Sep 11, 2023
1 parent eb6e0c1 commit 6a12d18
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions packages/core/src/singleton/API/types.ts
Original file line number Diff line number Diff line change
@@ -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;
/**
Expand All @@ -33,6 +20,9 @@ export type APIConfig = {
defaultAuthMode: GraphQLAuthMode;
region: string;
endpoint: string;
// TODO: switch this when dependency is added:
// modelIntrospectionSchema: InternalModelIntrospectionSchema;
modelIntrospectionSchema: any;
};
};

Expand All @@ -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';
Expand Down

0 comments on commit 6a12d18

Please sign in to comment.