Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Remove customLinkBuilder #227

Merged
merged 2 commits into from
Jan 31, 2019
Merged

Remove customLinkBuilder #227

merged 2 commits into from
Jan 31, 2019

Conversation

jhellar
Copy link
Contributor

@jhellar jhellar commented Jan 30, 2019

Description

https://issues.jboss.org/browse/AEROGEAR-8452

Links like offlineQueueLink or conflictLink should be exposed, so that users can build their own link chains. For example user may want to add retry link before http link. It should be documented how to build custom chains.

@wtrocki
Copy link
Contributor

wtrocki commented Jan 30, 2019

@jhellar They will be eventually in separate packages. THen entire client will be really thin.
I was proponent to remove fact that people can supply their custom link as this may not be as usable

@jhellar
Copy link
Contributor Author

jhellar commented Jan 30, 2019

@wtrocki ok. Other reason I created this PR is this https://github.com/aerogear/aerogear-js-sdk/blob/master/packages/sync/src/links/LinksBuilder.ts#L13

I think it would be better not to pass the offlineQueueLink like this. Would it make sense to remove the readme and expose parts from this PR and leave just the restructuring, so that offlineQueueLink is accessible in createClient where it is then used?

@wtrocki
Copy link
Contributor

wtrocki commented Jan 30, 2019

I would say entire thing is not needed. We should remove https://github.com/aerogear/aerogear-js-sdk/blob/master/packages/sync/src/links/LinksBuilder.ts#L18
Remove this from config and docs and then do everything including restore handler together.
This will give better flexibility and remove amount of hacks.

If someone wants to go custom they will just copy or extend this as there is no other implementation.

@jhellar jhellar force-pushed the AEROGEAR-8452 branch 2 times, most recently from cda7f49 to dd18912 Compare January 31, 2019 08:38
@jhellar
Copy link
Contributor Author

jhellar commented Jan 31, 2019

@wtrocki ok, should be fixed now

@jhellar jhellar changed the title Allow users to build their own link chain Remove customLinkBuilder Jan 31, 2019
@wtrocki
Copy link
Contributor

wtrocki commented Jan 31, 2019

Awesome. I will try this out, but before let's make sure that all our link definitions are also exported so people can use them outside

@jhellar
Copy link
Contributor Author

jhellar commented Jan 31, 2019

@wtrocki the definitions should be exposed now

@jhellar jhellar merged commit 3c031b7 into aerogear:master Jan 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants