Skip to content

Feature: Disabling async codegen #973

Open
@parsadotsh

Description

@parsadotsh

I want to use Juniper together with SQLite, and there's only one connection to the database at a time. If I set the Context struct as such:

pub struct Context {
    ///this could be a database connection
    db: Arc<Connection>
}

Then trying to use

struct Query;
#[graphql_object(context = Context, noasync)]
impl Query {
...

gives an error, because the context isn't sync
image

noasync doesn't appear to do anything. I don't want to use GraphQLValueAsync, I want to use Juniper purely synchronously. What can I do?

Metadata

Metadata

Assignees

Labels

enhancementImprovement of existing features or bugfixk::apiRelated to API (application interface)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions