Closed Kethatril closed 3 years ago
That'd be correct, the id
and uid
properties on a node doesn't exist. This is because each node is just an individual bit of JSON storing the attributes of a node. Basically: [{"type":"paragraph","content":[{"type":"text","text":"Some text"}]}]
- which when unserialized, creates a Paragraph node instance, which is just a model.
Yeah I knew why, probably shouldn't part of the schema for Paragraphs if they throw errors though. (The graphql explorer auto adds the id field every time you add a node type atm)
Do any Node types have uid/id, if not it might be worth not merging in the parent field definitions here: https://github.com/verbb/vizy/blob/dc68f50efad565a53c5c205f484b2d793d559812/src/gql/interfaces/VizyNodeInterface.php#L50-L70 if they are never used to prevent them from coming up on the interface (If that works at least)?
Ah, interesting, I forgot that it'll auto-suggest those attributes. I'll see what I can do to remove those, as they shouldn't be there. I imagine it's just inherited from the default interface - as you've mentioned.
Fixed for the next release. To get the fix early, change your verbb/vizy
requirement in composer.json
to:
"require": {
"verbb/vizy": "dev-craft-3 as 1.0.6",
"...": "..."
}
Then run composer update
.
Fixed in 1.0.7
Description When querying for the id and uid fields on Nodes in graphql you will get an error
Steps to reproduce
Getting unknown property: verbb\\vizy\\nodes\\Paragraph::id
Additional info