-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(data): appsync apollo extensions #7930
base: main
Are you sure you want to change the base?
Conversation
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
|
||
### Downloading the AWS AppSync schema | ||
|
||
The schema is used by Apollo’s code generation tool to generate API code that helps you execute GraphQL operations. To retrieve your AWS AppSync schema: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should include a programmatic example (despite not having a command to do this in the backend cli). In development these schema's will change quite often and downloading each time is cumbersome
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the base example should exist, as a way to show a simple way to get the schema from the console, while your suggestion to extend the example makes sense. The ideal example should utilize Apollo's codegen configuration to provide it the introspection endpoint and let Apollo retrieve it as part of the codegen process.
Other programmatic examples would involve taking on a dependency on AWS SDK, like for Javascript and writing a script to download the schema using the appsync client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added an example for swift for fetching the introspection schema programmatically using apollo-ios-cli
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: josef <[email protected]>
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
|
||
Once you have deployed your backend and created the `amplify_outputs.json` file, you can use Amplify library to read and retrieve your configuration values with the following steps: | ||
|
||
<InlineFilter filters={["swift"]}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need Android version of this section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the Android section, which is
- the gradle for the second package, could you update to the final name?
- a code example , need to add this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated dependency name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated code snippet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing the
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
…xtensions/index.mdx
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
…xtensions/index.mdx
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
…xtensions/index.mdx
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
…xtensions/index.mdx
src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx
Outdated
Show resolved
Hide resolved
|
||
AWS AppSync Apollo Extensions provide AWS AppSync authorizers to be used with the Apollo client to make it simple to apply the correct authorization payloads to your GraphQL operations. | ||
|
||
The Amplify library provides components to facilitate configuring the authorizers with Apollo client by providing configuration values to connect to your Amplify Data backend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Amplify library provides components to facilitate configuring the authorizers with Apollo client by providing configuration values to connect to your Amplify Data backend. | |
The Amplify library provides components to facilitate configuring the authorizers with Apollo client by providing configuration values to connect to your Amplify data backend. |
}; | ||
} | ||
|
||
AWS AppSync Apollo Extensions provide a seamless way to connect to your AWS AppSync backend using Apollo client, an open-source GraphQL client. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you find and replace lowercase e for Extensions in this - this isn't an official name so needs to be lowercase (at least I haven't seen the naming doc :))
|
||
<InlineFilter filters={["swift"]}> | ||
|
||
If you are using Amplify Auth, you can create a method that retrieves the Cognito access token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amplify auth
|
||
<InlineFilter filters={["swift"]}> | ||
|
||
If you are using Amplify Auth, you can use the following method for AWS_IAM auth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amplify auth
|
||
### Connecting Amplify Data to Apollo client | ||
|
||
Before you begin, you will need an Amplify Data backend deploy. To get started, see [Set up Data](/[platform]/build-a-backend/data/set-up-data/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amplify data
|
||
Once you have deployed your backend and created the `amplify_outputs.json` file, you can use Amplify library to read and retrieve your configuration values with the following steps: | ||
|
||
<InlineFilter filters={["swift"]}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing the
|
||
### Downloading the AWS AppSync schema | ||
|
||
The schema is used by Apollo’s code generation tool to generate API code that helps you execute GraphQL operations. The following steps integrate your AppSync schema with Apollo's code generation process: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppSync is prefix required - always need AWS before it (AWS AppSync)
Description of changes:
Related GitHub issue #, if available:
Instructions
If this PR should not be merged upon approval for any reason, please submit as a DRAFT
Which product(s) are affected by this PR (if applicable)?
Which platform(s) are affected by this PR (if applicable)?
Please add the product(s)/platform(s) affected to the PR title
Checks
Does this PR conform to the styleguide?
Does this PR include filetypes other than markdown or images? Please add or update unit tests accordingly.
Are any files being deleted with this PR? If so, have the needed redirects been created?
Are all links in MDX files using the MDX link syntax rather than HTML link syntax?
ref: MDX:
[link](https://docs.amplify.aws/)
HTML:
<a href="https://docs.amplify.aws/">link</a>
When this PR is ready to merge, please check the box below
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.