moved study stuff

This commit is contained in:
Duch Bot committed 2026-11-02 15:53:54 +00:00
1 parent 8eeb419ba4
commit 888fe03d46
37 files changed

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
# GraphQL
GraphQL is an FOSS agnostic query adaptor that allows you to query data from many different data sources. GraphQL is used to build APIs where clients will send a query for nested data. GraphQL mitigates the issue of versioned or rapidly changing APIs compared to REST APIs because you can request the data you want.
GraphQL schemas are written in the GraphQL SDL (Schema Definition Language) composed on:
- **Types**. Represent objects and their **fields**:
```graphql
type Query {
me: User
}
type User {
id: ID
name: String
}
```
- **Fields**
- **Queries**. Define the exact shape of the data needed by the client:
```graphql
query CurrentUser {
currentUser {
name
age
}
}
```
- **Mutations**. Allow for data to be create, updated or deleted:
```graphql
mutation CreateUser($name: String!, $age: Int!) {
createUser(userName: $name, age: $age) {
name
age
}
}
```
- **Subscriptions**. Supports live updates sent from the server to the client:
```graphql
subscription {
newPerson {
name
age
}
}
```
+44
View File
@@ -0,0 +1,44 @@
# AppSync
AppSync is a fully managed [[GraphQL|GraphQL]] service.
Notes:
- It can support real-time [[API]]s via GraphQL subscriptions.
- AppSync supports custom domains
- AppSync has a query editor built into the UI
## Resolvers
Resolvers attached to specific fields within your types in your schema. used to implement the state-changing operations for your query, mutation, and subscription field operations.
Runtimes:
- **`APPSYNC_JS`**: JavaScript
- **VTL**: Velocity Template Language.
## Data Sources
Where data is being pulled from.
- DynamoDB Table
- Amazon OpenSearch
- AWS [[_Lambda|Lambda Function]]
- [[HTTP]] Endpoint
- Amazon EventBridge
- Relational Database (RDS HTTP Endpoint)
## API Types
- **GraphQL APIs** - single API from multiple data sources
- **Merged APIs** - a collection of Graph APIs that act as one API
- Useful if you have multiple teams that manage their own API but you want to treat all the APIs as a single API.
## Caching Options
- **None**: Self explanatory; no caching, resolvers will always fetch from data sources.
- **Full request caching**: Self explanatory; caches all requests.
- **Per-resolver caching**: specific operation or field defined in a resolver will return responses from the cache.
Caching isn't serverless; you must provision an on-demand instance.
# Authorisation
- API Key
- AWS IAM
- Cognito User Pools