Skip to content

Commit

Permalink
Version Packages (#9071)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens authored Apr 2, 2024
1 parent 7d1e7c3 commit 0f7760f
Show file tree
Hide file tree
Showing 16 changed files with 48 additions and 56 deletions.
6 changes: 3 additions & 3 deletions .changeset/add-number-id.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
----
---
'@keystone-6/core': patch
----
---

Use `idField` type of `{ kind: 'number', kind: 'Int' | 'BigInt' }` internally for singletons
Use `db.idField` of `{ kind: 'number', kind: 'Int' }` internally for singletons
4 changes: 2 additions & 2 deletions .changeset/better-relationship-errors.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
----
---
'@keystone-6/core': patch
----
---

Fix static relationship resolution errors to conform to nominal error structure
6 changes: 3 additions & 3 deletions .changeset/boolean-not-false-2.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
----
---
'@keystone-6/core': patch
----
---

Fix `config.server.cors` type blocking `false` values
Fix `config.server.cors` type preventing value of `false`
6 changes: 3 additions & 3 deletions .changeset/boolean-not-false.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
----
---
'@keystone-6/core': patch
----
---

Fix `defaultIsFilterable` and `defaultIsOrderable` types blocking `true` values
Fix `defaultIsFilterable` and `defaultIsOrderable` types preventing value of `true`
3 changes: 3 additions & 0 deletions .changeset/contributors.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
"DiesIrae",
"DustinWoods",
"Greenheart",
"Grumaks",
"JedWatson",
"MadeByMike",
"MarcelMalik",
"Meetcpatel",
"MohammadKurjieh",
"MurzNN",
"Noviny",
"PaulAroo",
"ScottAgirs",
"SeanDoyleGit",
"Skulek",
Expand All @@ -32,6 +34,7 @@
"bladey",
"borisno2",
"ciruz",
"dagrinchi",
"dcousens",
"dependabot",
"dependabot[bot]",
Expand Down
4 changes: 2 additions & 2 deletions .changeset/deprecate-validate-hooks-f.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
----
---
'@keystone-6/core': minor
----
---

Adds `{field}.hooks.validate.[create|update|delete]` hooks, deprecates `validateInput` and `validateDelete` (throws if incompatible)
4 changes: 2 additions & 2 deletions .changeset/deprecate-validate-hooks.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
----
---
'@keystone-6/core': minor
----
---

Adds `{list}.hooks.validate.[create|update|delete]` hooks, deprecates `validateInput` and `validateDelete`
4 changes: 2 additions & 2 deletions .changeset/error-if-wrong-type.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
----
---
'@keystone-6/auth': patch
----
---

Fix `createInitial*` and `send*MagicAuthLink` to throw if the expected type from `sessionStrategy.start` is not a string
6 changes: 3 additions & 3 deletions .changeset/fix-create-express-app.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
----
---
'@keystone-6/core': patch
----
---

Fixes `createExpressApp` to use `context.graphql.schema` rather than the GraphQLSchema argument, removing ambiguity in downstream usage
Fixes `createExpressApp` to use `context.graphql.schema`, not the GraphQLSchema argument
2 changes: 1 addition & 1 deletion .changeset/http-async.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@keystone-6/core': minor
---

Add `async` to `extendHttpServer`, for `await` on startup
Add `async` to `extendHttpServer`, to support `await` on startup
6 changes: 3 additions & 3 deletions .changeset/less-extend-http-server.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
----
---
'@keystone-6/core': patch
----
---

Deprecates `extendHttpServer`'s `graphqlSchema` argument; use `context.graphql.schema` now
Deprecates `extendHttpServer`'s `graphqlSchema` argument, use `context.graphql.schema` instead
2 changes: 1 addition & 1 deletion .changeset/less-extend-type.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@keystone-6/core': Patch
'@keystone-6/core': patch
---

Deprecates `ExtendGraphQLSchema` type, use type `(schema: GraphQLSchema) => GraphQLSchema` instead
4 changes: 2 additions & 2 deletions .changeset/less-plimit.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
----
---
'@keystone-6/core': patch
----
---

Fix global locking by dropping global `p-limit` on `context.query`/`context.db`
4 changes: 2 additions & 2 deletions .changeset/same-field-order.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
----
---
'@keystone-6/core': patch
----
---

Fix `image` field type to use consistent sub-field ordering
4 changes: 2 additions & 2 deletions .changeset/text-null-default.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
----
---
'@keystone-6/core': patch
----
---

Fixes the `text` field type to accept a `defaultValue` of `null`
39 changes: 14 additions & 25 deletions docs/pages/docs/context/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,36 @@ The APIs provided by the `Context` object can be used to write the business logi
The `Context` object has the following properties, which are documented below.

```typescript
import type { Context } from '.keystone/types';

context = {
// HTTP request object
req,
res,
import type { Context } from '.keystone/types'

const context = {
// Query API
query,

// Internal DB object API
// Database API
db,

// HTTP request object
req,
res,

// Session API
session,
sessionStrategy

// GraphQL helpers
graphql: {
schema,
run,
raw,
},

// Session API
session,
sessionStrategy

// New context creators
sudo,
exitSudo,
withSession,
withRequest,
withSession,

// Database access
// Raw Prisma access
prisma,

// Images API
Expand All @@ -50,10 +49,7 @@ context = {
getDataFromRef,
getDataFromStream,
},

// Deprecated
gqlNames,
};
}
```

### HTTP request object
Expand Down Expand Up @@ -137,13 +133,6 @@ type ImageData = {

`async images.getDataFromStream(stream)`: Given a readable data stream, returns an `ImageData` object. The `mode` will be taken from `config.images.mode`, and `id` will be a `uuid` value. The other values will be inferred from the data stream itself. The contents of the stream will be written to the filesystem at `config.images.local.storagePath`.

### Deprecated

The following properties are deprecated and should not be used.
They will be removed in future releases.

`gqlNames`: A function which takes a `listKey` and returns an object containing the GraphQL query, mutation and type names related to that list.

## Related resources

{% related-content %}
Expand Down

0 comments on commit 0f7760f

Please sign in to comment.