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

Separate schema and execution config #324

Closed
namnm opened this issue Nov 5, 2018 · 5 comments
Closed

Separate schema and execution config #324

namnm opened this issue Nov 5, 2018 · 5 comments
Assignees
Milestone

Comments

@namnm
Copy link

namnm commented Nov 5, 2018

Right now the schema is also carry the execution config. For eg a schema is created as following:

var schema = Schema.Create(c =>{
    c.RegisterType(new QueryType());
    // TODO Register other types here

    // These configurations should be moved to another class for execution
    c.RegisterServiceProvider(new MyServiceProvider());
    c.Options.ExecutionTimeout = TimeSpan.FromSeconds(TIMEOUT);
    c.Options.DeveloperMode = DEVELOPMENT;
});

We should move the above config to another class, so the schema can be construct without the context (for eg ServiceProvider), and may be it can be stored statically as a singleton. Or we can modify the signature of Execute extension to take a service provider as a param.

@michaelstaib
Copy link
Member

The ISchema represents the executable schema. We might change the name an introduce something like a schema build from which the executable schema can be created. I have mot found an ideal solution but have targeted this under the label SchemaBuilder for version 0.11.0 in our roadmap.

@michaelstaib michaelstaib added this to the 0.11.0 milestone Nov 5, 2018
@michaelstaib michaelstaib modified the milestones: 0.11.0, 0.7.0 Dec 20, 2018
@michaelstaib michaelstaib self-assigned this Dec 20, 2018
@michaelstaib
Copy link
Member

We now have a QueryExecutionBuilder that contains the options, services and middleware components that belong to the execution. The next step is moving the options and making the options property on the schema configuration obsolete.

@michaelstaib
Copy link
Member

The following options shall be moved:

int? MaxExecutionDepth { get; }
TimeSpan ExecutionTimeout { get; }
bool DeveloperMode { get; }

@michaelstaib
Copy link
Member

Do we still need developer mode. Since we now have the exception handler. The only thing developer mode does is writing fill exceptions into the query errors. We could instead add a developer error handler and let this guy do exactly that.

@rstaib rstaib assigned rstaib and unassigned michaelstaib Dec 21, 2018
@michaelstaib
Copy link
Member

This one is now implemented with 0.7.0-preview.19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants