-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: Add instance data in loadInstanceOptionsFromStack #1380
feat: Add instance data in loadInstanceOptionsFromStack #1380
Conversation
26a726c
to
c897619
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.
The doc needs to be updated, but looks good!
a55057b
to
1c62657
Compare
Related #1381 |
932276f
to
08c75c3
Compare
@@ -1685,8 +1685,14 @@ instantiation of the client.` | |||
Q('io.cozy.settings').getById('io.cozy.settings.capabilities') | |||
) | |||
|
|||
const { data: instanceData } = await this.query( |
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.
Should be getOrFechFromState (I don’t know the name exactly) and you should add a fetchPolicy
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.
Updated. It should be always fresh so no fetchPolicy no?
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.
@zatteo I think using fetchQueryAndGetFromState
as proposed by @Crash-- is only useful if we add a fetchPolicy. That being said, I'm not sure we want this kind of logic at this level, I don't think I like the idea of a forced fetchPolicy that could lead to unexpected results from the caller.
In any case, the behaviour should be the same for the other query just above on io.cozy.settings.capabilities.
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.
So :
- no fetchPolicy because we need it fresh
- same method for the two calls : decided to stay on query for the moment
08c75c3
to
367e354
Compare
367e354
to
1bfc6a0
Compare
We need
locale
attribute on flagship app.