Skip to content

Reuse generator? #415

@murbanowicz

Description

@murbanowicz

Hi,

Would you accept simple PR which would cache and reuse the generator during the same session?
Setting up the generator take few seconds, so in our case, when we use generateSchema over 100 times in test, it takes crazy long time, while with a 'hacked' solution, it took few seconds.

What I mean is doing something like this:

let generator;
function generateSchema(program, fullTypeName, args, onlyIncludeFiles) {
    if (generator=== undefined) {
        generator= buildGenerator(program, args, onlyIncludeFiles);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions