AppSync now supports HTTP endpoints as data sources: HTTP resolver. It enables customers to use their existing backend services that use REST APIs with AppSync to leverage the power of GraphQL interfaces.

Let’s see how to create a new AppSync API. Fist of all, create a new AWS AppSync client and then create a new API:

1

2

3

4

5

6

7

8

9

10

11

12

client=boto3.client(

'appsync',

region_name='eu-west-1'

)

response=client.create_graphql_api(

name='My Graphql API',

authenticationType='API_KEY'

)

api_id=response['graphqlApi']['apiId']# this is the API ID, we need it for the next steps

graphql_api_url=response['graphqlApi']['uris']['GRAPHQL']

When you create a new API you need to specify the API name and the API authentication type. In the example I used the API_KEY authentication type. Here you can read more about authentication types: AWS AppSync Security .

Data sources and resolvers are how AWS AppSync translates GraphQL requests and fetches information from your AWS resources.
AWS AppSync has support for automatic provisioning and connections with certain data source types. You can use a GraphQL API with your existing AWS resources or build data sources and resolvers. This section takes you through this process in a series of tutorials for better understanding how the details work and tuning options.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. If you want to know more or withdraw your consent to all or some of the cookies, please refer to the coockie policy. Got it!Reject.