-
Notifications
You must be signed in to change notification settings - Fork 57
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
[3634] Simplifying the contribution to the GraphQL subscription of the diagram for custom nodes #3639
Conversation
e98ed58
to
15afbed
Compare
let apolloClientOptions: ApolloClientOptions<NormalizedCacheObject> = { | ||
link, | ||
cache, | ||
connectToDevTools: true, | ||
defaultOptions, | ||
documentTransform: documentTransformToLoad, |
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.
Why do you need another extension point when configurers just a couple line below can transform as they like the options?
By the way, please write commit messages that explain what they do and not how they do it. Nobody will understand what this extension point means. Write instead that you are simplifying the contribution to the GraphQL subscription of the diagram for custom nodes.
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 the extension point because I wanted to make it more explicit but I'll remove it then.
I'll modify the commite message.
15afbed
to
1cefa7e
Compare
const apolloClientOptionsConfigurer: ApolloClientOptionsConfigurer = (currentOptions) => { | ||
return { | ||
...currentOptions, | ||
documentTransform: ellipseNodeStyleDocumentTransform, |
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.
If another configurer has created some documentTransform, it will override it, we should consider merging them instead
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.
Nobody does that today but the code of sirius-web-application
may change later
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.
Yes I had the concat
method before when I created a dedicated extension point. I removed it because I then thought that it would be the responsibility of the contributor then.
1cefa7e
to
7c6f72c
Compare
94eba3c
to
edc6852
Compare
…e diagram for custom nodes Bug: #3634 Signed-off-by: Michaël Charfadi <[email protected]>
Bug: #3656 Signed-off-by: Stéphane Bégaudeau <[email protected]>
edc6852
to
a99e0cd
Compare
Bug: #3634
Pull request template
General purpose
What is the main goal of this pull request?
Project management
priority:
andpr:
labels been added to the pull request? (In case of doubt, start with the labelspriority: low
andpr: to review later
)area:
,difficulty:
,type:
)CHANGELOG.adoc
been updated to reference the relevant issues?CHANGELOG.adoc
? (Including changes in the GraphQL API)CHANGELOG.adoc
? For example indoc/screenshots/2022.5.0-my-new-feature.png
Architectural decision records (ADR)
[doc]
?CHANGELOG.adoc
?Dependencies
CHANGELOG.adoc
?CHANGELOG.adoc
?Frontend
This section is not relevant if your contribution does not come with changes to the frontend.
General purpose
Typing
We need to improve the typing of our code, as such, we require every contribution to come with proper TypeScript typing for both changes contributing new files and those modifying existing files.
Please ensure that the following statements are true for each file created or modified (this may require you to improve code outside of your contribution).
useMutation<DATA_TYPE, VARIABLE_TYPE>(…)
useQuery<DATA_TYPE, VARIABLE_TYPE>(…)
useSubscription<DATA_TYPE, VARIABLE_TYPE>(…)
useMachine<CONTEXT_TYPE, EVENTS_TYPE>(…)
useState<STATE_TYPE>(…)
?.
(if the GraphQL API specifies that a field cannot benull
, do not treat it has potentiallynull
for example)let diagram: Diagram | null = null;
)Backend
This section is not relevant if your contribution does not come with changes to the backend.
General purpose
Architecture
Review
How to test this PR?
Please describe here the various use cases to test this pull request