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

Preserve type already added #543

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fezfez
Copy link
Contributor

@fezfez fezfez commented Jan 12, 2023

Hello,

With this PR this code will preserve MyCustomInputType

        $factory = new SchemaFactory();
        $factory->setSchemaConfig(SchemaConfig::create([
            'types' => [
                MyCustomInputType::getInstance()
            ]
        ]));

       $schema = $factory->createSchema();

@fezfez
Copy link
Contributor Author

fezfez commented Jan 12, 2023

Is this a good approach ? if it seem to good to you i will fix the tests, otherwise can you provide a good way to do this ?

@oojacoboo
Copy link
Collaborator

@fezfez Can you describe in a bit more detail what it is you're hoping to accomplish here? What's the design challenge you're having in your API? Is it that you're basically wanting a static type? Assuming so, I don't see any point in doing this, as opposed to just programming an input to be static itself.

@fezfez
Copy link
Contributor Author

fezfez commented Jan 13, 2023

@oojacoboo i have created a very lite sample of my problem at https://github.com/fezfez/sample-graphqlite

@oojacoboo
Copy link
Collaborator

@fezfez , would it be possible to get an explanation of your intended goals here as well? I can see from the code you're trying to create custom types using the webonyx API. But why? Can you explain why you cannot use a normal annotated object, or what the overall goal is?

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

Successfully merging this pull request may close these issues.

2 participants