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

Is example running well? #1

Closed
kination opened this issue Oct 16, 2016 · 2 comments
Closed

Is example running well? #1

kination opened this issue Oct 16, 2016 · 2 comments

Comments

@kination
Copy link

I got error when running cargo run --example server after cargo build.

error[E0432]: unresolved import `juniper::iron_handlers::GraphQLHandler`. Could not find `iron_handlers` in `juniper`
  --> examples/server.rs:13:30
   |
13 | use juniper::iron_handlers::{GraphQLHandler, GraphiQLHandler};
   |                              ^^^^^^^^^^^^^^

error[E0432]: unresolved import `juniper::iron_handlers::GraphiQLHandler`. Could not find `iron_handlers` in `juniper`
  --> examples/server.rs:13:46
   |
13 | use juniper::iron_handlers::{GraphQLHandler, GraphiQLHandler};
   |                                              ^^^^^^^^^^^^^^^

error[E0432]: unresolved import `juniper::tests::model::Database`. Could not find `tests` in `juniper`
  --> examples/server.rs:14:5
   |
14 | use juniper::tests::model::Database;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors

error: Could not compile `juniper`.

Am I doing something wrong?

@mhallin
Copy link
Member

mhallin commented Oct 16, 2016

I haven't found a way to specify features as dependencies for examples in Cargo.toml, so at the moment you need to run

cargo run --example server --features "iron-handlers expose-test-schema"

@kination
Copy link
Author

@mhallin Thanks!

@mhallin mhallin closed this as completed Dec 18, 2016
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