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

Reenable Candid and Custom Resolvers #123

Open
5 tasks
lastmjs opened this issue Jul 9, 2021 · 0 comments
Open
5 tasks

Reenable Candid and Custom Resolvers #123

lastmjs opened this issue Jul 9, 2021 · 0 comments

Comments

@lastmjs
Copy link
Contributor

lastmjs commented Jul 9, 2021

There are a couple issues with Candid, and I do not have time to address them right now, so I have disabled deriving Candid and trying to do this in Rust. This means that custom resolvers do not work anymore. Once the following issues are resolved, we can reenable CandidType and thus custom resolvers. But custom resolvers probably won't be very useful until we have some kind of authorization at the schema level anyway, since currently there is no way to have authorization on a custom resolver without allowing arbitrary access to object type queries.

  • I need to be able to add the CandidType derive macro attribute, but it doesn't work for serde_json::Value. So I either need to implement my own Value type that is a custom scalar, or the candid library needs to implement CandidType for serde_json::Value, I am not sure there is any other way right now since CandidType and serde_json::Value or both defined outside of my crate. See here for some more information, I want to push for the candid library to provide this implementation, since it will be so common: https://forum.dfinity.org/t/derive-candidtype-with-serde-json/5800
    • I could also consider forking candid again and adding the functionality myself, but it was so painful to fork last time, I really am not sure it even works
  • The results of this issue need to show up in ic-cdk: As a library developer, I want to have candid_path rethought so that consumers of my library do not need to depend on ic_cdk directly dfinity/candid#248
    • I am waiting for ic-cdk to release a new version that has the new candid library version, then I can use the candid_path macro attribute and I don't need to force users to include ic-cdk directly. It would be nice for this to be included
  • Maybe they would allow a pull request for serde_json::Value, if so I should offer to do the work
@lastmjs lastmjs changed the title Reenable Candid Reenable Candid and Custom Resolvers Jul 9, 2021
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

No branches or pull requests

1 participant