Skip to content
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

Redefine Context #19

Merged
merged 3 commits into from
Dec 9, 2017
Merged

Redefine Context #19

merged 3 commits into from
Dec 9, 2017

Conversation

LoicPoullain
Copy link
Member

@LoicPoullain LoicPoullain commented Dec 8, 2017

Issues

  • Having contexts defined as any prevents from using TypeScript features.
  • Adding in a hook custom attributes to the context may conflict with future foal releases if new official attributes appear.
  • Having an id attribute in the context is only relevant in REST cases.

Solutions

Define a Context interface. It should include:

  • useful attributes from the request (headers, session, params, query, etc),
  • a state attribute where custom attributes can be specified,
  • attributes that are not only relevant in REST cases.

@LoicPoullain LoicPoullain mentioned this pull request Dec 9, 2017
18 tasks
@LoicPoullain LoicPoullain merged commit f6bab94 into v0-4-0 Dec 9, 2017
@LoicPoullain LoicPoullain deleted the redefine-context branch December 9, 2017 12:29
@LoicPoullain LoicPoullain added this to In Progress in Issue tracking Dec 9, 2017
@LoicPoullain LoicPoullain moved this from In Progress to Done in Issue tracking Dec 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant