Skip to content

Failed to compile with uuid #237

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

Closed
jaidTw opened this issue Aug 30, 2018 · 3 comments
Closed

Failed to compile with uuid #237

jaidTw opened this issue Aug 30, 2018 · 3 comments

Comments

@jaidTw
Copy link

jaidTw commented Aug 30, 2018

Not sure am I doing wrong, but I got an error when I was trying to use uuid::Uuid in my schema.

use uuid::Uuid;

#[derive(GraphQLObject)]
struct User {
    ...
    photo: Option<Uuid>
}
error[E0277]: the trait bound `uuid::Uuid: juniper::GraphQLType` is not satisfied
  --> src/qlschema.rs:10:10
   |
10 | #[derive(GraphQLObject)]
   |          ^^^^^^^^^^^^^ the trait `juniper::GraphQLType` is not implemented for `uuid::Uuid`
   |
   = note: required because of the requirements on the impl of `juniper::GraphQLType` for `std::option::Option<uuid::Uuid>`

I've read the source, and as the guide mentioned, there's no any explicity configuration needed, right?
The installed version of juniper is 0.9.2, with uuid 0.6.5, have tried both nightly and stable toolchain.

@LegNeato
Copy link
Member

Are you using master or the version from crates.io?

@LegNeato
Copy link
Member

I just confirmed it fails with the release but works with master. I'm trying to get a release out but don't yet have permissions to push (#210).

In the meantime you should do:

[dependencies]
juniper = { git = "https://github.com/graphql-rust/juniper.git"}

@jaidTw
Copy link
Author

jaidTw commented Aug 31, 2018

I will use the master first, thanks!

@theduke theduke mentioned this issue Jun 22, 2019
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

2 participants