Skip to content

Commit

Permalink
Merge branch 'main' into fix/type-case-generation-with-only-reserved-…
Browse files Browse the repository at this point in the history
…fields
  • Loading branch information
calvincestari committed Feb 9, 2024
2 parents 24cfe84 + d375fa3 commit bb48311
Show file tree
Hide file tree
Showing 10 changed files with 439 additions and 316 deletions.
2 changes: 1 addition & 1 deletion docs/shared/setup-codegen/single-panel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ From your project's root directory, run the following command with your customiz

- `${MySchemaName}` provides a name for the namespace of your generated schema files.
- `${ModuleType}` configures how your generated schema types are included in your project.
> This is a crucial decision to make **before configuring code generation**. To determine the right option for your project, see [Project Configuration](/ios/project-configuration).
> This is a crucial decision to make **before configuring code generation**. To determine the right option for your project, see [Project Configuration](/ios/project-configuration/intro).
>
> To get started quickly, you can use the `embeddedInTarget` option.
> Using `embeddedInTarget`, you must supply a target name using the `--target-name` command line option.
Expand Down
28 changes: 28 additions & 0 deletions docs/source/client-directives.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: Client Directives
description: Custom GraphQL directives used by the Apollo iOS SDK
---

These are the custom directives used by the Apollo iOS SDK. These directives can be included in your `.graphql` definition files to enable their behaviors.

All client directives listed here will be consumed only by Apollo iOS and will not be included in the definitions sent to your GraphQL endpoint via network transport.

---

### `@import(module: String!)`

`directive @import(module: String!) repeatable on QUERY | MUTATION | SUBSCRIPTION | FRAGMENT_DEFINITION`

Adds an import statement for the given `module` name to the top of a definition's generated Swift file.

This directive can be used to enable sharing of fragment models across generated definitions in multiple modules of a project. See the documentation on [sharing fragments across modules](./project-configuration/operation-models#sharing-fragments-across-modules) for more information.

---

### `@apollo_client_ios_localCacheMutation`

`directive @apollo_client_ios_localCacheMutation on QUERY | MUTATION | SUBSCRIPTION | FRAGMENT_DEFINITION`

Defines a definition as a local cache mutation. This changes makes the generated operation model mutable.

See the documentation on [defining local cache mutations](./caching/cache-transactions#defining-local-cache-mutations) for more information.
14 changes: 12 additions & 2 deletions docs/source/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@
"sidebar": {
"Introduction": "/",
"Get Started": "/get-started",
"Project Configuration": "/project-configuration",
"Project Configuration": [
{
"Introduction": "/project-configuration/intro",
"1. Project Modularization": "/project-configuration/modularization",
"2. Schema Types": "/project-configuration/schema-types",
"3. Operation Models": "/project-configuration/operation-models",
"SDK components": "/project-configuration/sdk-components"
},
true
],
"Migration Guides": [
{
"v1.0": "/migrations/1.0",
Expand Down Expand Up @@ -51,7 +60,8 @@
"ApolloAPI": "https://www.apollographql.com/docs/ios/docc/documentation/ApolloAPI",
"ApolloWebSocket": "https://www.apollographql.com/docs/ios/docc/documentation/ApolloWebSocket",
"ApolloSQLite": "https://www.apollographql.com/docs/ios/docc/documentation/ApolloSQLite",
"ApolloCodegenLib": "https://www.apollographql.com/docs/ios/docc/documentation/ApolloCodegenLib"
"ApolloCodegenLib": "https://www.apollographql.com/docs/ios/docc/documentation/ApolloCodegenLib",
"Client Directives": "/client-directives"
},
true
],
Expand Down
4 changes: 2 additions & 2 deletions docs/source/migrations/1.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Apollo iOS's code generation engine provides flexible configuration options that

> **Before migrating to Apollo iOS 1.0, you should consider your project structure and decide how you want to include your generated schema module and operation models.**
>
> To learn about how you can best integrate Apollo iOS to suit your project's needs, see our [Project configuration documentation](../project-configuration).
> To learn about how you can best integrate Apollo iOS to suit your project's needs, see our [Project configuration documentation](../project-configuration/intro).
To migrate to Apollo iOS 1.0, you'll do the following:
1. [Update your Apollo iOS dependency](#1-update-to-apollo-ios-10)
Expand All @@ -68,7 +68,7 @@ Begin by updating your Apollo iOS dependency to the latest version. You can incl

To receive bug fixes and new features, we recommend including `1.0` up to the next major release.

> To see the modules provided by the Apollo iOS SDK (and determine which modules you need), see [SDK components](../project-configuration#apollo-ios-sdk-components).
> To see the modules provided by the Apollo iOS SDK (and determine which modules you need), see [SDK components](../project-configuration/intro#apollo-ios-sdk-components).
<CodeColumns cols={2}>

Expand Down
311 changes: 0 additions & 311 deletions docs/source/project-configuration.mdx

This file was deleted.

0 comments on commit bb48311

Please sign in to comment.