Is there a way to retrive SchemaBuilder for graphql ? #5614
lamb0tiana
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm facing of usecase where I need to reuse some type definition set from my entity.
So I need that type for an other computed field which I want reuse the type of entity.
here is the way I think for that but apparently it renders a bug like "Schema must contain unique named type Player", it comes fromt webonyx.
`
$out = file_get_contents("$dir/public/schema.graphql");
$schema = BuildSchema::build($out);
$playerType = $schema->getType('Player');
`
I want to reuse PlayerType, I think (may be I'm wrong) I need to retrieve the SchemaBuilder to retrieve PlayerType instead of rebuilding type like so.
How would you suggest for that ?
Beta Was this translation helpful? Give feedback.
All reactions