graphql-rust / juniper

GraphQL server library for Rust
Other
5.62k stars 416 forks source link

expected tuple struct or tuple variant, found function `Ok` #1229

Closed folivi closed 7 months ago

folivi commented 7 months ago

Hi all,

I have a struct MyStructFromDatabase {}

I have to turn into a Graphql object I need to return.

But my compiler complains with this error:

error: expected tuple struct or tuple variant, found function Ok label: not a tuple struct or tuple variant

What I'm I doin't wrong?

Thank you for your help

folivi commented 7 months ago

Seems like the issue came for VS Code.

tyranron commented 7 months ago

@folivi an empty struct cannot be a GraphQL object, because it's obligated to have fields.