diff --git a/generated/.tailcallrc.graphql b/generated/.tailcallrc.graphql index 254916ae2c..8ede43cb18 100644 --- a/generated/.tailcallrc.graphql +++ b/generated/.tailcallrc.graphql @@ -25,16 +25,7 @@ directive @cache( ) on FIELD_DEFINITION """ -For instance, if you have a `user(id: Int!): User @http(path: "/users/{{args.id}}")` -field on the `Query` type, you can reference it from another field on the `Query` -type using the `@call` operator. So, on `Post.user` you can declare `user: User @call(query: -"user", args: {id: "{{value.userId}}"})`, and this will replace the `{{args.id}}` -used in the `@http` operator with the value of `userId` from the `Post` type.In case -you have a `user(input: UserInput!): User @http(path: "/users")` field on the `Mutation` -type, you can reference it from another field on the `Mutation` type. So, on `Post.user` -you can declare `user: User @call(mutation: "user", args: {input: "{{value.userInput}}"})`, -and this will replace the `{{args.input}}` used in the `@http` operator with the -value of `userInput` from the `Post` type. +Provides the ability to refer to a field defined in the root Query or Mutation. """ directive @call( """ diff --git a/generated/.tailcallrc.schema.json b/generated/.tailcallrc.schema.json index 371624f29f..882a400b2b 100644 --- a/generated/.tailcallrc.schema.json +++ b/generated/.tailcallrc.schema.json @@ -152,7 +152,7 @@ } }, "Call": { - "description": "For instance, if you have a `user(id: Int!): User @http(path: \"/users/{{args.id}}\")` field on the `Query` type, you can reference it from another field on the `Query` type using the `@call` operator. So, on `Post.user` you can declare `user: User @call(query: \"user\", args: {id: \"{{value.userId}}\"})`, and this will replace the `{{args.id}}` used in the `@http` operator with the value of `userId` from the `Post` type.\n\nIn case you have a `user(input: UserInput!): User @http(path: \"/users\")` field on the `Mutation` type, you can reference it from another field on the `Mutation` type. So, on `Post.user` you can declare `user: User @call(mutation: \"user\", args: {input: \"{{value.userInput}}\"})`, and this will replace the `{{args.input}}` used in the `@http` operator with the value of `userInput` from the `Post` type.", + "description": "Provides the ability to refer to a field defined in the root Query or Mutation.", "type": "object", "properties": { "args": { diff --git a/src/config/config.rs b/src/config/config.rs index 70981070d2..3b40561669 100644 --- a/src/config/config.rs +++ b/src/config/config.rs @@ -590,14 +590,10 @@ pub struct Http { pub query: KeyValues, } -#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq, schemars::JsonSchema)] -// The @call operator is used to reference a resolver operator (`@http`, `@grpc`, `@graphQL`) from a field on `Query` type. /// -/// For instance, if you have a `user(id: Int!): User @http(path: "/users/{{args.id}}")` field on the `Query` type, you can reference it from another field on the `Query` type using the `@call` operator. -/// So, on `Post.user` you can declare `user: User @call(query: "user", args: {id: "{{value.userId}}"})`, and this will replace the `{{args.id}}` used in the `@http` operator with the value of `userId` from the `Post` type. +/// Provides the ability to refer to a field defined in the root Query or Mutation. /// -/// In case you have a `user(input: UserInput!): User @http(path: "/users")` field on the `Mutation` type, you can reference it from another field on the `Mutation` type. -/// So, on `Post.user` you can declare `user: User @call(mutation: "user", args: {input: "{{value.userInput}}"})`, and this will replace the `{{args.input}}` used in the `@http` operator with the value of `userInput` from the `Post` type. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq, schemars::JsonSchema)] pub struct Call { #[serde(default, skip_serializing_if = "is_default")] /// The name of the field on the `Query` type that you want to call. For instance `user`.