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(api): hide generateClient from api/server subpath #12483

Merged
merged 2 commits into from
Oct 31, 2023

Conversation

HuiSF
Copy link
Member

@HuiSF HuiSF commented Oct 31, 2023

Description of changes

  • Fixed missing api in adapter-nextjs packages.json files
  • Hide generateClient from aws-amplify/api/server

Issue #, if available

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@HuiSF HuiSF requested review from a team as code owners October 31, 2023 19:01
@@ -1,7 +1,7 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import { generateClient as internalGenerateClient } from '@aws-amplify/api/server';
import { generateClient as internalGenerateClient } from '@aws-amplify/api/internals';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are 2 versions of generateClient. We want the server one here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the server edition of generateClient into packages/api/src/internals/InternalAPI.ts which is being exported from '@aws-amplify/api/internals' in this PR.

Should rename the function to make it clearer it's the server edition?

jimblanc
jimblanc previously approved these changes Oct 31, 2023
AllanZhengYP
AllanZhengYP previously approved these changes Oct 31, 2023
Copy link
Member

@AllanZhengYP AllanZhengYP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense for the /api path. Defer to Ivan's comments on the /server to /internals change

@HuiSF HuiSF dismissed stale reviews from AllanZhengYP and jimblanc via 270f486 October 31, 2023 19:28
@HuiSF HuiSF force-pushed the hui/chore/fix-api-exports branch from d0638a3 to 270f486 Compare October 31, 2023 19:28
@HuiSF HuiSF force-pushed the hui/chore/fix-api-exports branch from 270f486 to 1248617 Compare October 31, 2023 19:33
@HuiSF HuiSF merged commit cfbde4c into main Oct 31, 2023
28 checks passed
@HuiSF HuiSF deleted the hui/chore/fix-api-exports branch October 31, 2023 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants