-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use @aws-amplify/graphql-generator in model-generator (#243)
* refactor: use @aws-amplify/graphql-generator in model-generator * chore: refresh lockfile
- Loading branch information
Showing
10 changed files
with
772 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@aws-amplify/model-generator': patch | ||
--- | ||
|
||
refactor: use @aws-amplify/graphql-generator in model-generator |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/model-generator/src/appsync_schema_fetcher.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import assert from 'node:assert'; | ||
import { describe, it, mock } from 'node:test'; | ||
import { AppSyncClient } from '@aws-sdk/client-appsync'; | ||
import { AppSyncIntrospectionSchemaFetcher } from './appsync_schema_fetcher.js'; | ||
|
||
describe('AppSyncIntrospectionSchemaFetcher', () => { | ||
it('fetches schema from AppSync', async () => { | ||
const schema = Buffer.from([1, 2, 3, 4, 5]); | ||
const send = mock.fn(() => { | ||
return { schema }; | ||
}); | ||
const appSyncClient = { | ||
send, | ||
} as unknown as AppSyncClient; | ||
const schemaFetcher = new AppSyncIntrospectionSchemaFetcher(appSyncClient); | ||
const apiId = 'mock-api-id'; | ||
const res = await schemaFetcher.fetch(apiId); | ||
assert.equal(res, '\x01\x02\x03\x04\x05'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 0 additions & 57 deletions
57
packages/model-generator/src/graphql_statements_formatter.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters