Skip to content

Commit

Permalink
Fixed Tag Composition Tooling (#6783)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed Dec 18, 2023
1 parent 1f5c901 commit 72d7610
Show file tree
Hide file tree
Showing 30 changed files with 701 additions and 162 deletions.
13 changes: 4 additions & 9 deletions src/HotChocolate/Caching/test/Caching.Tests/SchemaTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,29 @@ public async Task Allow_CacheControl_On_FieldDefinition()
schema {
query: Query
}

type Book {
title: String! @cacheControl(maxAge: 5000)
description: String!
}

type Query {
book: Book! @cacheControl(maxAge: 0)
}

"The scope of a cache hint."
enum CacheControlScope {
"The value to cache is not tied to a single user."
PUBLIC
"The value to cache is specific to a single user."
PRIVATE
}

"The `@cacheControl` directive may be provided for individual fields or entire object, interface or union types to provide caching hints to the executor."
directive @cacheControl("The maximum amount of time this field's cached value is valid, in seconds." maxAge: Int "If `PRIVATE`, the field's value is specific to a single user. The default value is `PUBLIC`, which means the field's value is not tied to a single user." scope: CacheControlScope "If `true`, the field inherits the `maxAge` of its parent field." inheritMaxAge: Boolean) on OBJECT | FIELD_DEFINITION | INTERFACE | UNION
<<<<<<< HEAD

directive @tag(name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION
=======

"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}"
directive @tag("The name of the tag." name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION
>>>>>>> 3f34684f9c (Fixed issue that caused the tag directive to be ignored. (#6746))
""");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,7 @@
"HotChocolate.Execution.Abstractions": "[0.0.0, )",
"HotChocolate.Fetching": "[0.0.0, )",
"HotChocolate.Types": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )",
"HotChocolate.Validation": "[0.0.0, )",
"Microsoft.Extensions.DependencyInjection": "[6.0.0, )",
"System.Threading.Channels": "[6.0.0, )"
Expand Down Expand Up @@ -1492,6 +1493,12 @@
"hotchocolate.utilities": {
"type": "Project"
},
"hotchocolate.utilities.dependencyinjection": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[6.0.0, )"
}
},
"hotchocolate.validation": {
"type": "Project",
"dependencies": {
Expand Down Expand Up @@ -2890,6 +2897,7 @@
"HotChocolate.Execution.Abstractions": "[0.0.0, )",
"HotChocolate.Fetching": "[0.0.0, )",
"HotChocolate.Types": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )",
"HotChocolate.Validation": "[0.0.0, )",
"Microsoft.Extensions.DependencyInjection": "[7.0.0, )",
"System.Threading.Channels": "[7.0.0, )"
Expand Down Expand Up @@ -2977,6 +2985,12 @@
"hotchocolate.utilities": {
"type": "Project"
},
"hotchocolate.utilities.dependencyinjection": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[7.0.0, )"
}
},
"hotchocolate.validation": {
"type": "Project",
"dependencies": {
Expand Down Expand Up @@ -4375,6 +4389,7 @@
"HotChocolate.Execution.Abstractions": "[0.0.0, )",
"HotChocolate.Fetching": "[0.0.0, )",
"HotChocolate.Types": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )",
"HotChocolate.Validation": "[0.0.0, )",
"Microsoft.Extensions.DependencyInjection": "[8.0.0, )",
"System.Threading.Channels": "[8.0.0, )"
Expand Down Expand Up @@ -4462,6 +4477,12 @@
"hotchocolate.utilities": {
"type": "Project"
},
"hotchocolate.utilities.dependencyinjection": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[8.0.0, )"
}
},
"hotchocolate.validation": {
"type": "Project",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,8 @@
"HotChocolate": "[0.0.0, )",
"HotChocolate.Subscriptions.InMemory": "[0.0.0, )",
"HotChocolate.Transport.Sockets": "[0.0.0, )",
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )"
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )"
}
},
"hotchocolate.authorization": {
Expand All @@ -1838,6 +1839,7 @@
"HotChocolate.Execution.Abstractions": "[0.0.0, )",
"HotChocolate.Fetching": "[0.0.0, )",
"HotChocolate.Types": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )",
"HotChocolate.Validation": "[0.0.0, )",
"Microsoft.Extensions.DependencyInjection": "[6.0.0, )",
"System.Threading.Channels": "[6.0.0, )"
Expand Down Expand Up @@ -2031,6 +2033,12 @@
"hotchocolate.utilities": {
"type": "Project"
},
"hotchocolate.utilities.dependencyinjection": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[6.0.0, )"
}
},
"hotchocolate.validation": {
"type": "Project",
"dependencies": {
Expand Down Expand Up @@ -3863,7 +3871,8 @@
"HotChocolate": "[0.0.0, )",
"HotChocolate.Subscriptions.InMemory": "[0.0.0, )",
"HotChocolate.Transport.Sockets": "[0.0.0, )",
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )"
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )"
}
},
"hotchocolate.authorization": {
Expand All @@ -3879,6 +3888,7 @@
"HotChocolate.Execution.Abstractions": "[0.0.0, )",
"HotChocolate.Fetching": "[0.0.0, )",
"HotChocolate.Types": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )",
"HotChocolate.Validation": "[0.0.0, )",
"Microsoft.Extensions.DependencyInjection": "[7.0.0, )",
"System.Threading.Channels": "[7.0.0, )"
Expand Down Expand Up @@ -4112,6 +4122,12 @@
"hotchocolate.utilities": {
"type": "Project"
},
"hotchocolate.utilities.dependencyinjection": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[7.0.0, )"
}
},
"hotchocolate.validation": {
"type": "Project",
"dependencies": {
Expand Down Expand Up @@ -5979,7 +5995,8 @@
"HotChocolate": "[0.0.0, )",
"HotChocolate.Subscriptions.InMemory": "[0.0.0, )",
"HotChocolate.Transport.Sockets": "[0.0.0, )",
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )"
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )"
}
},
"hotchocolate.authorization": {
Expand All @@ -5995,6 +6012,7 @@
"HotChocolate.Execution.Abstractions": "[0.0.0, )",
"HotChocolate.Fetching": "[0.0.0, )",
"HotChocolate.Types": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )",
"HotChocolate.Validation": "[0.0.0, )",
"Microsoft.Extensions.DependencyInjection": "[8.0.0, )",
"System.Threading.Channels": "[8.0.0, )"
Expand Down Expand Up @@ -6228,6 +6246,12 @@
"hotchocolate.utilities": {
"type": "Project"
},
"hotchocolate.utilities.dependencyinjection": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[8.0.0, )"
}
},
"hotchocolate.validation": {
"type": "Project",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,8 @@
"HotChocolate": "[0.0.0, )",
"HotChocolate.Subscriptions.InMemory": "[0.0.0, )",
"HotChocolate.Transport.Sockets": "[0.0.0, )",
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )"
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )"
}
},
"hotchocolate.authorization": {
Expand All @@ -1305,6 +1306,7 @@
"HotChocolate.Execution.Abstractions": "[0.0.0, )",
"HotChocolate.Fetching": "[0.0.0, )",
"HotChocolate.Types": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )",
"HotChocolate.Validation": "[0.0.0, )",
"Microsoft.Extensions.DependencyInjection": "[6.0.0, )",
"System.Threading.Channels": "[6.0.0, )"
Expand Down Expand Up @@ -1518,6 +1520,12 @@
"hotchocolate.utilities": {
"type": "Project"
},
"hotchocolate.utilities.dependencyinjection": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[6.0.0, )"
}
},
"hotchocolate.validation": {
"type": "Project",
"dependencies": {
Expand Down Expand Up @@ -2812,7 +2820,8 @@
"HotChocolate": "[0.0.0, )",
"HotChocolate.Subscriptions.InMemory": "[0.0.0, )",
"HotChocolate.Transport.Sockets": "[0.0.0, )",
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )"
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )"
}
},
"hotchocolate.authorization": {
Expand All @@ -2828,6 +2837,7 @@
"HotChocolate.Execution.Abstractions": "[0.0.0, )",
"HotChocolate.Fetching": "[0.0.0, )",
"HotChocolate.Types": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )",
"HotChocolate.Validation": "[0.0.0, )",
"Microsoft.Extensions.DependencyInjection": "[7.0.0, )",
"System.Threading.Channels": "[7.0.0, )"
Expand Down Expand Up @@ -3081,6 +3091,12 @@
"hotchocolate.utilities": {
"type": "Project"
},
"hotchocolate.utilities.dependencyinjection": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[7.0.0, )"
}
},
"hotchocolate.validation": {
"type": "Project",
"dependencies": {
Expand Down Expand Up @@ -4442,7 +4458,8 @@
"HotChocolate": "[0.0.0, )",
"HotChocolate.Subscriptions.InMemory": "[0.0.0, )",
"HotChocolate.Transport.Sockets": "[0.0.0, )",
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )"
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )"
}
},
"hotchocolate.authorization": {
Expand All @@ -4458,6 +4475,7 @@
"HotChocolate.Execution.Abstractions": "[0.0.0, )",
"HotChocolate.Fetching": "[0.0.0, )",
"HotChocolate.Types": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )",
"HotChocolate.Validation": "[0.0.0, )",
"Microsoft.Extensions.DependencyInjection": "[8.0.0, )",
"System.Threading.Channels": "[8.0.0, )"
Expand Down Expand Up @@ -4711,6 +4729,12 @@
"hotchocolate.utilities": {
"type": "Project"
},
"hotchocolate.utilities.dependencyinjection": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[8.0.0, )"
}
},
"hotchocolate.validation": {
"type": "Project",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,8 @@
"HotChocolate": "[0.0.0, )",
"HotChocolate.Subscriptions.InMemory": "[0.0.0, )",
"HotChocolate.Transport.Sockets": "[0.0.0, )",
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )"
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )"
}
},
"hotchocolate.authorization": {
Expand All @@ -1838,6 +1839,7 @@
"HotChocolate.Execution.Abstractions": "[0.0.0, )",
"HotChocolate.Fetching": "[0.0.0, )",
"HotChocolate.Types": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )",
"HotChocolate.Validation": "[0.0.0, )",
"Microsoft.Extensions.DependencyInjection": "[6.0.0, )",
"System.Threading.Channels": "[6.0.0, )"
Expand Down Expand Up @@ -2030,6 +2032,12 @@
"hotchocolate.utilities": {
"type": "Project"
},
"hotchocolate.utilities.dependencyinjection": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[6.0.0, )"
}
},
"hotchocolate.validation": {
"type": "Project",
"dependencies": {
Expand Down Expand Up @@ -3862,7 +3870,8 @@
"HotChocolate": "[0.0.0, )",
"HotChocolate.Subscriptions.InMemory": "[0.0.0, )",
"HotChocolate.Transport.Sockets": "[0.0.0, )",
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )"
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )"
}
},
"hotchocolate.authorization": {
Expand All @@ -3878,6 +3887,7 @@
"HotChocolate.Execution.Abstractions": "[0.0.0, )",
"HotChocolate.Fetching": "[0.0.0, )",
"HotChocolate.Types": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )",
"HotChocolate.Validation": "[0.0.0, )",
"Microsoft.Extensions.DependencyInjection": "[7.0.0, )",
"System.Threading.Channels": "[7.0.0, )"
Expand Down Expand Up @@ -4110,6 +4120,12 @@
"hotchocolate.utilities": {
"type": "Project"
},
"hotchocolate.utilities.dependencyinjection": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[7.0.0, )"
}
},
"hotchocolate.validation": {
"type": "Project",
"dependencies": {
Expand Down Expand Up @@ -5977,7 +5993,8 @@
"HotChocolate": "[0.0.0, )",
"HotChocolate.Subscriptions.InMemory": "[0.0.0, )",
"HotChocolate.Transport.Sockets": "[0.0.0, )",
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )"
"HotChocolate.Types.Scalars.Upload": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )"
}
},
"hotchocolate.authorization": {
Expand All @@ -5993,6 +6010,7 @@
"HotChocolate.Execution.Abstractions": "[0.0.0, )",
"HotChocolate.Fetching": "[0.0.0, )",
"HotChocolate.Types": "[0.0.0, )",
"HotChocolate.Utilities.DependencyInjection": "[0.0.0, )",
"HotChocolate.Validation": "[0.0.0, )",
"Microsoft.Extensions.DependencyInjection": "[8.0.0, )",
"System.Threading.Channels": "[8.0.0, )"
Expand Down Expand Up @@ -6225,6 +6243,12 @@
"hotchocolate.utilities": {
"type": "Project"
},
"hotchocolate.utilities.dependencyinjection": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[8.0.0, )"
}
},
"hotchocolate.validation": {
"type": "Project",
"dependencies": {
Expand Down
Loading

0 comments on commit 72d7610

Please sign in to comment.