You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The order in which the Query types are extended does not affect the compilation of separate schema files.
1137
-
</Callout>
1138
-
1139
-
<Calloutinfo>
1140
-
Declaring custom Query, Mutation, and/or Subscription with the same field names in another schema file will result in schema validation errors similar to the following:
1138
+
The order in which the Query types are extended does not affect the compilation of separate schema files. However, declaring custom Query, Mutation, and/or Subscription extensions with the same field names in another schema file will result in schema validation errors similar to the following:
1141
1139
1142
1140
`🛑 Object type extension 'Query' cannot redeclare field getBlogById`
1143
1141
</Callout>
1144
1142
1145
-
<Calloutinfo>
1146
-
Amplify directives are currently not supported on the extended type definitions. You can use the extend keyword to organize custom queries, mutations, and subscriptions that use [custom resolvers](https://docs.amplify.aws/gen1/react/build-a-backend/graphqlapi/best-practice/batch-put-custom-resolver/).
1143
+
4. Add functionality to the fields of the extended type using Amplify directives. Amplify supports the `@auth`, `@function`, and `@http` directives on fields of `Query`, `Mutation`, and `Subscription` type extensions. Alternately, you can use the `extend` keyword to organize custom queries, mutations, and subscriptions that use [custom resolvers](https://docs.amplify.aws/gen1/react/build-a-backend/graphqlapi/best-practice/batch-put-custom-resolver/) rather than Amplify directives.
1147
1144
1148
-
For the latest updates and potential future enhancements, please track the ongoing discussion in [GitHub Issue #3036](https://github.com/aws-amplify/amplify-category-api/issues/3036).
1145
+
<Calloutinfo>
1146
+
Amplify directives are not supported on extended type definitions themselves (e.g., `extend type Todo @auth...`), or on fields of types other than `Query`, `Mutation`, and `Subscription`.
0 commit comments