Open MurzNN opened 1 month ago
Seems we need to replace it with ->toString()
- is it right?
This one works well (also replaced deprecated query()
to parse()
:
$fragment = new GraphQL\Entities\Fragment('properties', 'Hero');
$fragment->use('id', 'age');
$hero = new \GraphQL\Actions\Query('hero');
echo $hero->use('name', $fragment)->parse();
echo $fragment->toString();
If the modified example is okay - I can prepare a PR with this change.
When I copy-paste the Fragment example from the readme:
it throws an error: