keystonejs / keystone

The superpowered headless CMS for Node.js — built with GraphQL and React
https://keystonejs.com
MIT License
9.18k stars 1.15k forks source link

Fix `createInitial*` and `send*MagicAuthLink` to throw if the expected type from `sessionStrategy.start` is not a string #9018

Closed dcousens closed 7 months ago

dcousens commented 7 months ago

This pull requests updates some comments, refines some types and removes some casts in favour of errors in packages/auth/src/gql/getInitFirstItemSchema.ts and packages/auth/src/gql/getMagicAuthLinkSchema.ts.

The mutations were previously casting as string, and this isn't guaranteed by the type of SessionStrategy. Some other changes are bundled including some minor updates to our release script and GitHub CI naming.

Lastly, this pull request adds some additional defaults in initConfig, which will be removed soon but can help debugging by reducing the number of cases where configuration variables are undefined.

codesandbox-ci[bot] commented 7 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 0776cfe8d57ecbc7e0a40728a7f198e9ac53cce2:

Sandbox Source
@keystone-6/sandbox Configuration