{"action":"created","issue":{"url":"https://api.github.com/repos/graphql-rust/juniper/issues/293","repository_url":"https://api.github.com/repos/graphql-rust/juniper","labels_url":"https://api.github.com/repos/graphql-rust/juniper/issues/293/labels{/name}","comments_url":"https://api.github.com/repos/graphql-rust/juniper/issues/293/comments","events_url":"https://api.github.com/repos/graphql-rust/juniper/issues/293/events","html_url":"https://github.com/graphql-rust/juniper/issues/293","id":391448163,"node_id":"MDU6SXNzdWUzOTE0NDgxNjM=","number":293,"title":"juniper::types::base::GraphQLType is not satisfied despite graphql_object!","user":{"login":"sssilver","id":619878,"node_id":"MDQ6VXNlcjYxOTg3OA==","avatar_url":"https://avatars2.githubusercontent.com/u/619878?v=4","gravatar_id":"","url":"https://api.github.com/users/sssilver","html_url":"https://github.com/sssilver","followers_url":"https://api.github.com/users/sssilver/followers","following_url":"https://api.github.com/users/sssilver/following{/other_user}","gists_url":"https://api.github.com/users/sssilver/gists{/gist_id}","starred_url":"https://api.github.com/users/sssilver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sssilver/subscriptions","organizations_url":"https://api.github.com/users/sssilver/orgs","repos_url":"https://api.github.com/users/sssilver/repos","events_url":"https://api.github.com/users/sssilver/events{/privacy}","received_events_url":"https://api.github.com/users/sssilver/received_events","type":"User","site_admin":false},"labels":[{"id":440634144,"node_id":"MDU6TGFiZWw0NDA2MzQxNDQ=","url":"https://api.github.com/repos/graphql-rust/juniper/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-12-16T09:02:06Z","updated_at":"2018-12-16T20:02:41Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI have the following code:\r\n\r\n```rust\r\nextern crate iron;\r\n#[macro_use] extern crate juniper;\r\nextern crate juniper_iron;\r\nextern crate mount;\r\n\r\nuse iron::prelude::*;\r\nuse juniper::{EmptyMutation};\r\nuse juniper_iron::{GraphQLHandler, GraphiQLHandler};\r\nuse mount::Mount;\r\n\r\nstruct RootQuery;\r\n\r\ngraphql_object!(RootQuery: Context |&self| {});\r\n\r\nstruct Context {}\r\nimpl juniper::Context for Context {}\r\n\r\nfn context_factory(_: &mut Request) -> IronResult<Context> {\r\n    Ok(Context{})\r\n}\r\n\r\nfn main() {\r\n    let mut mount = Mount::new();\r\n\r\n    let graphiql_endpoint = GraphiQLHandler::new(\"/graphql\");\r\n    let graphql_endpoint = GraphQLHandler::new(\r\n        context_factory,\r\n        RootQuery,\r\n        EmptyMutation::<Context>::new(),\r\n    );\r\n\r\n    mount.mount(\"/\", graphiql_endpoint);\r\n    mount.mount(\"/graphql\", graphql_endpoint);\r\n\r\n    let mut chain = Chain::new(mount);\r\n\r\n    let host = \"0.0.0.0:8080\".to_owned();\r\n    println!(\"GraphQL server started on {}\", host);\r\n    Iron::new(chain).http(host.as_str()).unwrap();\r\n}\r\n```\r\n\r\nHowever, despite having the `graphql_object!` invocation, compilation fails for me:\r\n```\r\nerror[E0277]: the trait bound `RootQuery: juniper::types::base::GraphQLType` is not satisfied\r\n  --> src/main.rs:54:28\r\n   |\r\n54 |     let graphql_endpoint = GraphQLHandler::new(\r\n   |                            ^^^^^^^^^^^^^^^^^^^ the trait `juniper::types::base::GraphQLType` is not implemented for `RootQuery`\r\n   |\r\n   = note: required by `<juniper_iron::GraphQLHandler<'a, CtxFactory, Query, Mutation, CtxT>>::new`\r\n\r\nerror[E0277]: the trait bound `juniper::EmptyMutation<Context>: juniper::types::base::GraphQLType` is not satisfied\r\n  --> src/main.rs:54:28\r\n   |\r\n54 |     let graphql_endpoint = GraphQLHandler::new(\r\n   |                            ^^^^^^^^^^^^^^^^^^^ the trait `juniper::types::base::GraphQLType` is not implemented for `juniper::EmptyMutation<Context>`\r\n   |\r\n   = note: required by `<juniper_iron::GraphQLHandler<'a, CtxFactory, Query, Mutation, CtxT>>::new`\r\n\r\nerror[E0277]: the trait bound `RootQuery: juniper::types::base::GraphQLType` is not satisfied\r\n  --> src/main.rs:54:28\r\n   |\r\n54 |       let graphql_endpoint = GraphQLHandler::new(\r\n   |  ____________________________^\r\n55 | |         context_factory,\r\n56 | |         RootQuery,\r\n57 | |         EmptyMutation::<Context>::new(),\r\n58 | |     );\r\n   | |_____^ the trait `juniper::types::base::GraphQLType` is not implemented for `RootQuery`\r\n   |   = note: required by `juniper_iron::GraphQLHandler`\r\n\r\nerror[E0277]: the trait bound `juniper::EmptyMutation<Context>: juniper::types::base::GraphQLType` is not satisfied\r\n  --> src/main.rs:54:28\r\n   |\r\n54 |       let graphql_endpoint = GraphQLHandler::new(\r\n   |  ____________________________^\r\n55 | |         context_factory,\r\n56 | |         RootQuery,\r\n57 | |         EmptyMutation::<Context>::new(),\r\n58 | |     );\r\n   | |_____^ the trait `juniper::types::base::GraphQLType` is not implemented for `juniper::EmptyMutation<Context>`\r\n   |\r\n   = note: required by `juniper_iron::GraphQLHandler`\r\n```\r\n\r\nWhat's causing this?"},"comment":{"url":"https://api.github.com/repos/graphql-rust/juniper/issues/comments/447671362","html_url":"https://github.com/graphql-rust/juniper/issues/293#issuecomment-447671362","issue_url":"https://api.github.com/repos/graphql-rust/juniper/issues/293","id":447671362,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzY3MTM2Mg==","user":{"login":"sssilver","id":619878,"node_id":"MDQ6VXNlcjYxOTg3OA==","avatar_url":"https://avatars2.githubusercontent.com/u/619878?v=4","gravatar_id":"","url":"https://api.github.com/users/sssilver","html_url":"https://github.com/sssilver","followers_url":"https://api.github.com/users/sssilver/followers","following_url":"https://api.github.com/users/sssilver/following{/other_user}","gists_url":"https://api.github.com/users/sssilver/gists{/gist_id}","starred_url":"https://api.github.com/users/sssilver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sssilver/subscriptions","organizations_url":"https://api.github.com/users/sssilver/orgs","repos_url":"https://api.github.com/users/sssilver/repos","events_url":"https://api.github.com/users/sssilver/events{/privacy}","received_events_url":"https://api.github.com/users/sssilver/received_events","type":"User","site_admin":false},"created_at":"2018-12-16T20:02:41Z","updated_at":"2018-12-16T20:02:41Z","author_association":"NONE","body":"That's wild.\r\nDo you mind sharing your Cargo.toml?"}}
{"actor":{"display_login":"sssilver"}}