Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Error when building same schema for different service collections #144

Copy link
Copy link
Closed
@Fgruntjes

Description

@Fgruntjes
Issue body actions

When initialising the same schema for multiple ServiceCollection's you can only do this when calling UseGraphQL before you run AddGraphQL on the second collection.

var service1Collection = new ServiceCollection();
var service2Collection = new ServiceCollection();

service1Collection.AddGraphQL<CandleSchema>(options =>
{
    options.AddGraphType<Candle>();
});
service2Collection.AddGraphQL<CandleSchema>(options =>
{
    options.AddGraphType<Candle>();
});

This produces the error: The schema type CandleSchema has already been registered. Each schema type may only be registered once with GraphQL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.