-
Notifications
You must be signed in to change notification settings - Fork 52
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
IPFS plugin separation of concerns #930
IPFS plugin separation of concerns #930
Conversation
packages/js/plugins/uri-resolvers/ipfs-resolver/src/__tests__/e2e.spec.ts
Outdated
Show resolved
Hide resolved
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.
Awesome stuff ser 🔥
Feel free to ignore my code styles suggestions :-D
schema: ./src/schema.graphql | ||
import_redirects: | ||
- uri: "ens/uri-resolver.core.polywrap.eth" | ||
schema: ../../../../core-interfaces/uri-resolver/src/query.graphql |
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.
Let's remove the query
word and rename the file to schema.graphql
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.
This is referenced in multiple PRs right now - If it's okay with you, I'd do this as part of an end-of-PRs "cleanup PR" which would redo some of the folder structure, and change naming. We should also think about building the interface rather than referencing directly from src
- something I've done in the FS MR (#912) and this one for their respective interfaces.
packages/js/plugins/uri-resolvers/ipfs-resolver/src/__tests__/e2e.spec.ts
Show resolved
Hide resolved
packages/js/plugins/uri-resolvers/ipfs-resolver/src/utils/IpfsClient.ts
Outdated
Show resolved
Hide resolved
…lugin-separation-of-concerns
… multiformats package
URI resolver test fixes
…lugin-separation-of-concerns
…lugin-separation-of-concerns
Partially closes #622 and #714 (IPFS part)
After discussion with @nerfZael the following was done:
Introduced an interface for IPFS-like plugins
Extracted uri-resolver interface implementation from IPFS plugin into its own
ipfs-uri-resolver-plugin-js
pluginipfs-plugin-js
now contains only basic IPFS-related functions, with theipfs-uri-resolver-plugin-js
depending on theipfs-plugin-js
.Introduced a new build command for interfaces that follow the @web3api/*-interface pattern and added it to the main build command - same as #912
Possible circular dependency noticed:
Interfaces require CLI to be built, which results in a
CLI -> Plugins -> Interfaces -> CLI
circular dependency. Advice on how to proceed is very much appreciated.Remaining work:
ipfs-uri-resolver-plugin-js
ipfs-plugin-js
<- I noticed these were missing@dOrgJelli We commented on moving the resolver plugins into a separate folder - I would like to do this once we finish up the separation of concerns work so that we move all 3 resolver plugins as part of a single PR. Hope that's okay.
Advice/feedback would be much appreciated!