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

Lifetimes not supported in derive(GraphQLObject) #225

Closed
djc opened this issue Aug 19, 2018 · 0 comments
Closed

Lifetimes not supported in derive(GraphQLObject) #225

djc opened this issue Aug 19, 2018 · 0 comments
Assignees
Labels
p::critical Critical priority for implementation

Comments

@djc
Copy link
Contributor

djc commented Aug 19, 2018

The Diesel tutorial seems to advocate (somewhat sensibly) that an insertion type (like NewHuman) contains the human's name as a reference (&'str). This of course means the containing struct gains a lifetime annotation. When I tried to derive(GraphQLObject) on such a struct, I got errors:

error[E0106]: missing lifetime specifier
   --> src/models.rs:293:10
    |
293 | #[derive(GraphQLInputObject, Insertable)]
    |          ^^^^^^^^^^^^^^^^^^ expected lifetime parameter

error[E0261]: use of undeclared lifetime name `'a`
   --> src/models.rs:293:10
    |
293 | #[derive(GraphQLInputObject, Insertable)]
    |          ^^^^^^^^^^^^^^^^^^ undeclared lifetime
LegNeato added a commit to LegNeato/juniper that referenced this issue Aug 20, 2018
@LegNeato LegNeato self-assigned this Aug 20, 2018
@LegNeato LegNeato added enhancement Improvement of existing features or bugfix p::critical Critical priority for implementation and removed enhancement Improvement of existing features or bugfix labels Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p::critical Critical priority for implementation
Projects
None yet
Development

No branches or pull requests

2 participants