Prerequisites
- A workspace in Amplication
- An API token for the workspace
Amplication + GraphQL
Amplication is built with GraphQL in mind. This means that you can easily integrate Amplication with any IDP using by calling the GraphQL API.Authentication
Your calls to the Amplication GraphQL API will need to be authenticated. You should use the API token to authenticate your calls. This is done by sending the token in theAuthorization
header of your request:
Requests
Since we’re working with GraphQL, you’ll need to make requests to the GraphQL endpoint. The endpoint ishttps://server.amplication.com/graphql
and it will accept POST requests for queries and mutations.
This is a sample query:
Get Requests
This is how you fetch templates.
Query
Query
Variables
Variables
Response
Response
Post Requests
Scaffolding a resource from an existing template is something we can do often.
Query
Query
Variables
Variables
Response
Response