Skip to content

GraphQL object should use Builder pattern like the schema objects #273

@bbakerman

Description

@bbakerman

Currently the GraphQL top level object is instantiated via newGraphQL(x,y)

However PRs are already trying to add new capabilities wired into this top level object. And hence the constructor signature keeps expanding.

A Builder pattern should be used. eg:

  GraphQL.newObject(StarWarsSchema.starWarsSchema)
            .executionStrategy(new ExecutorServiceExecutionStrategy(threadPoolExecutor))
            .build()

This would also be consistent with the way schema objects are built etc...which helps consumers avoid "cognitive dissonance" in the API

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions