Skip to content

Commit c12ec3e

Browse files
authored
Adds some missing migration steps, and fixes a typo (#25)
1 parent eabe4a2 commit c12ec3e

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

modules/ROOT/pages/migration/v4-migration/authorization.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const server = new ApolloServer({
101101
const { url } = await startStandaloneServer(server, {
102102
listen: { port: 4000 },
103103
context: async ({ req }) => ({
104-
token: req.headers.Authorization,
104+
token: req.headers.authorization,
105105
}),
106106
});
107107
----

modules/ROOT/pages/migration/v4-migration/index.adoc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,20 @@ type query {
574574

575575
Additionally, escaping strings is no longer needed.
576576

577+
=== `@exclude` removed
578+
579+
The `@exclude` directive has been removed in favor of much more granular configuration directives.
580+
581+
The new `@query`, `@mutation` and `@subscription` directives instead allow for fully granular configuration for each operation.
582+
583+
As a direct migration, the following usages are equivalent:
584+
585+
* `@exclude` and `@query(read: false, aggregate: false) @mutation(operations: []) @subscription(events: [])`.
586+
* `@exclude(operations: [READ])` and `@query(read: false, aggregate: false)`.
587+
* `@exclude(operation: [CREATE, UPDATE, DELETE])` and `@mutation(operations: [])`.
588+
589+
Whilst there is more verbosity, the directives are significantly more powerful and extensible as the library gains features.
590+
577591
[full-text-migration]
578592
=== `@fulltext` changes
579593

@@ -856,6 +870,16 @@ type Record @limit(default: 10, max: 100) {
856870
}
857871
----
858872

873+
=== `@readonly` and `@writeonly` removed
874+
875+
The `@readonly` and `@writeonly` directives have been removed in favor of more granular configuration directives.
876+
The new `@selectable` and `@settable` directives can be used to configure not only if fields are readable or writable, but also when they should be readable or writable.
877+
878+
As a direct migration, the following usages are equivalent:
879+
880+
* `@readonly` and `@settable(onCreate: false, onUpdate: false)`.
881+
* `@writeonly` and `@selectable(onRead: false, onAggregate: false)`.
882+
859883
[relationship-aggregate]
860884
=== `@relationship` changes
861885

0 commit comments

Comments
 (0)