Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump to data-schema version ^0.18.0 #13297

Merged
merged 4 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1041,15 +1041,15 @@ const amplifyConfig = {
type: 'key',
properties: {
name: 'secondaryIndexModelsByTitle',
queryField: 'listByTitle',
queryField: 'listSecondaryIndexModelByTitle',
fields: ['title'],
},
},
{
type: 'key',
properties: {
name: 'secondaryIndexModelsByDescriptionAndViewCount',
queryField: 'listByDescriptionAndViewCount',
queryField: 'listSecondaryIndexModelByDescriptionAndViewCount',
fields: ['description', 'viewCount'],
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5292,7 +5292,7 @@ exports[`generateClient index queries PK and SK index query 1`] = `
"options": {
"body": {
"query": "query ($description: String!, $viewCount: ModelIntKeyConditionInput, $filter: ModelSecondaryIndexModelFilterInput, $sortDirection: ModelSortDirection, $limit: Int, $nextToken: String) {
listByDescriptionAndViewCount(
listSecondaryIndexModelByDescriptionAndViewCount(
description: $description
viewCount: $viewCount
filter: $filter
Expand Down Expand Up @@ -5344,7 +5344,7 @@ exports[`generateClient index queries PK and SK index query, with sort direction
"options": {
"body": {
"query": "query ($description: String!, $viewCount: ModelIntKeyConditionInput, $filter: ModelSecondaryIndexModelFilterInput, $sortDirection: ModelSortDirection, $limit: Int, $nextToken: String) {
listByDescriptionAndViewCount(
listSecondaryIndexModelByDescriptionAndViewCount(
description: $description
viewCount: $viewCount
filter: $filter
Expand Down Expand Up @@ -5397,7 +5397,7 @@ exports[`generateClient index queries PK and SK index query, with sort direction
"options": {
"body": {
"query": "query ($description: String!, $viewCount: ModelIntKeyConditionInput, $filter: ModelSecondaryIndexModelFilterInput, $sortDirection: ModelSortDirection, $limit: Int, $nextToken: String) {
listByDescriptionAndViewCount(
listSecondaryIndexModelByDescriptionAndViewCount(
description: $description
viewCount: $viewCount
filter: $filter
Expand Down Expand Up @@ -5450,7 +5450,7 @@ exports[`generateClient index queries PK-only index query 1`] = `
"options": {
"body": {
"query": "query ($title: String!, $filter: ModelSecondaryIndexModelFilterInput, $sortDirection: ModelSortDirection, $limit: Int, $nextToken: String) {
listByTitle(
listSecondaryIndexModelByTitle(
title: $title
filter: $filter
sortDirection: $sortDirection
Expand Down
21 changes: 12 additions & 9 deletions packages/api-graphql/__tests__/internals/generateClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5337,9 +5337,10 @@ describe('generateClient', () => {

const client = generateClient<Schema>({ amplify: Amplify });

const { data } = await client.models.SecondaryIndexModel.listByTitle({
title: 'Hello World',
});
const { data } =
await client.models.SecondaryIndexModel.listSecondaryIndexModelByTitle({
title: 'Hello World',
});

expect(normalizePostGraphqlCalls(spy)).toMatchSnapshot();

Expand Down Expand Up @@ -5374,10 +5375,12 @@ describe('generateClient', () => {
const client = generateClient<Schema>({ amplify: Amplify });

const { data } =
await client.models.SecondaryIndexModel.listByDescriptionAndViewCount({
description: 'something something',
viewCount: { gt: 4 },
});
await client.models.SecondaryIndexModel.listSecondaryIndexModelByDescriptionAndViewCount(
{
description: 'something something',
viewCount: { gt: 4 },
},
);

expect(normalizePostGraphqlCalls(spy)).toMatchSnapshot();

Expand Down Expand Up @@ -5427,7 +5430,7 @@ describe('generateClient', () => {
const client = generateClient<Schema>({ amplify: Amplify });

const { data } =
await client.models.SecondaryIndexModel.listByDescriptionAndViewCount(
await client.models.SecondaryIndexModel.listSecondaryIndexModelByDescriptionAndViewCount(
{
description: 'match',
viewCount: { lt: 4 },
Expand Down Expand Up @@ -5476,7 +5479,7 @@ describe('generateClient', () => {
const client = generateClient<Schema>({ amplify: Amplify });

const { data } =
await client.models.SecondaryIndexModel.listByDescriptionAndViewCount(
await client.models.SecondaryIndexModel.listSecondaryIndexModelByDescriptionAndViewCount(
{
description: 'match',
viewCount: { lt: 4 },
Expand Down
2 changes: 1 addition & 1 deletion packages/api-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"dependencies": {
"@aws-amplify/api-rest": "4.0.28",
"@aws-amplify/core": "6.0.28",
"@aws-amplify/data-schema": "^0.17.0",
"@aws-amplify/data-schema": "^0.18.0",
"@aws-sdk/types": "3.387.0",
"graphql": "15.8.0",
"rxjs": "^7.8.1",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading