-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Session
type parameter for TypeInfo
, Lists
and Context
#8570
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
* | ||
* @default keystonejs-session | ||
*/ | ||
cookieName?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this, as keystonejs-session
as a cookie name was wildly opinionated
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. |
ec152ca
to
5f8188c
Compare
Session
type parameter for TypeInfo
, Lists
and Context
c036694
to
50271fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice Work!!!
This pull request amends the types exported by Keystone to support a new
Session
type parameter forTypeInfo
, written asTypeInfo<Session>
.The following type parameters have been added:
TypeInfo<Session>
Lists<Session>
Context<Session>
Config<Session>
The new
Session
type parameter will propagate to the underlying functions and schema in the same manner asContext
, ensuring thatcontext.session
is changed from the default ofany
.This pull request additionally adds or fixes a number of session related examples to adhere to this new format, and actually resolved a few type errors that had existed with respect to the previous
Session
types used in the examples. 🎉