I currently have two available schema's that resolve to completely different queries. At this time the azure function startup file when going through the process of dependency injection it only takes the most recent schema added. So the query only resolves to the most recently added Schema. I believe it's a naming conflict with the interface being used but I don't actually know how to get around it.
I tried adding the services as both a transient and scoped.
builder.Services.AddTransient<ISchema>(_ => new SchemaOne(new FuncDependencyResolver(type => (IGraphType)_.GetRequiredService(type))));
builder.Services.AddTransient<ISchema>(_ => new SchemaTwo(new FuncDependencyResolver(type => (IGraphType)_.GetRequiredService(type))));
or
builder.Services.AddScoped<ISchema>(_ => new SchemaOne(new FuncDependencyResolver(type => (IGraphType)_.GetRequiredService(type))));
builder.Services.AddScoped<ISchema>(_ => new SchemaTwo(new FuncDependencyResolver(type => (IGraphType)_.GetRequiredService(type))));
The goal is to be able to have both queries resolve to their respective schemas. At this time { queryOne { name } }
returns the error "message": "Cannot query field \"queryOne\" on type \"QueryTwoType\".",