apollo-elements/apollo-elements

View on GitHub
docs/decks/azconf-dev-2021/slides/55-apollo-mutation-controller-flavours.md

Summary

Maintainability
Test Coverage
---
name: ApolloMutationController flavours
attrs: float-header
---

## `ApolloMutationController` flavours

### Lit

```ts
mutation = new ApolloMutationController(this, UpdateProfileMutation);
```

<section reveal>

### FAST
```ts
mutation = new ApolloMutationBehavior(this, UpdateProfileMutation);
```

</section>

<section reveal>

### Hooks (Haunted, Atomico)

```ts
const [updateProfile, { data, loading }] = useMutation(UpdateProfileMutation);
```

</section>

<section reveal>

### Hybrids

```ts
mutation: mutation(UpdateProfileMutation),
```

</section>