graphql-request-appsync-iam 5.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [5.0.1](https://github.com/stevecaldwell77/graphql-request-appsync-iam-js/compare/v5.0.0...v5.0.1) (2026-02-10)
6
+
7
+ - Fix published package
8
+
5
9
  ## [5.0.0](https://github.com/stevecaldwell77/graphql-request-appsync-iam-js/compare/v4.0.0...v5.0.0) (2026-02-06)
6
10
 
7
11
  ### BREAKING CHANGES
@@ -0,0 +1,9 @@
1
+ import type { AwsCredentialIdentity } from '@aws-sdk/types';
2
+ import { GraphQLClient } from 'graphql-request';
3
+ type Options = Omit<RequestInit & {
4
+ awsCredentials?: AwsCredentialIdentity;
5
+ awsRegion?: string;
6
+ }, 'fetch'>;
7
+ export declare const getGraphQLClient: (url: string, options?: Options) => GraphQLClient;
8
+ export {};
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,KAAK,OAAO,GAAG,IAAI,CACf,WAAW,GAAG;IACV,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,EACD,OAAO,CACV,CAAC;AASF,eAAO,MAAM,gBAAgB,QACpB,MAAM,YACD,OAAO,KAClB,aAeF,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,26 @@
1
+ import { createSignedFetch } from '@scaldwell77/aws-signed-fetch';
2
+ import { GraphQLClient } from 'graphql-request';
3
+ import { omit } from 'lodash-es';
4
+ // graphql-request is stricter about typing than fetch
5
+ const transformMethod = (method) => {
6
+ if (method === 'GET' || method === 'get')
7
+ return 'GET';
8
+ if (method === 'POST' || method === 'post')
9
+ return 'POST';
10
+ return undefined;
11
+ };
12
+ export const getGraphQLClient = (url, options) => {
13
+ const clientOptions = omit(options, ['awsCredentials', 'awsRegion']);
14
+ const fetch = createSignedFetch({
15
+ service: 'appsync',
16
+ awsCredentials: options?.awsCredentials,
17
+ awsRegion: options?.awsRegion,
18
+ });
19
+ const client = new GraphQLClient(url, {
20
+ ...clientOptions,
21
+ method: transformMethod(clientOptions.method),
22
+ fetch,
23
+ });
24
+ return client;
25
+ };
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAUjC,sDAAsD;AACtD,MAAM,eAAe,GAAG,CAAC,MAAe,EAA8B,EAAE;IACpE,IAAI,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IACvD,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1D,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC5B,GAAW,EACX,OAAiB,EACJ,EAAE;IACf,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAAC;IACrE,MAAM,KAAK,GAAG,iBAAiB,CAAC;QAC5B,OAAO,EAAE,SAAS;QAClB,cAAc,EAAE,OAAO,EAAE,cAAc;QACvC,SAAS,EAAE,OAAO,EAAE,SAAS;KAChC,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,GAAG,EAAE;QAClC,GAAG,aAAa;QAChB,MAAM,EAAE,eAAe,CAAC,aAAa,CAAC,MAAM,CAAC;QAC7C,KAAK;KACR,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "graphql-request-appsync-iam",
3
3
  "description": "Extension of graphql-request that can be used to make calls to an AppSync API using IAM authorization.",
4
- "version": "5.0.0",
4
+ "version": "5.0.1",
5
5
  "ava": {
6
6
  "typescript": {
7
7
  "rewritePaths": {