GraphQL and UUID URI

70 kali dilihat
Langsung ke pesan pertama yang belum dibaca

Fan Li

belum dibaca,
28 Jul 2020, 09.30.1728/07/20
kepadaTopBraid Suite Users
I am very excited to explore the GraphQL capability in EDG but it seems class with UUID URI has some readability issue  in GraphQL query.

A comparison: 

A GraphQL query for class ex:carModel:
{
ex_carModel (orderBy: label) {
label
}
}

 A GraphQL query for class ex:c87d21f6-2c4e-11b2-8091-0242ac120019:
{
ex_c__d__f___c_e___b___________ac______s (orderBy: label) {
label
}
}

Since I don't have the option to change the ontology, is there anything else I can do?


Holger Knublauch

belum dibaca,
28 Jul 2020, 19.16.2028/07/20
kepadatopbrai...@googlegroups.com

Hi Fan Li,

you can attach a graphql:name to your class/node shape or to property shapes. In your case, try adding a triple

ex:c87d21f6-2c4e-11b2-8091-0242ac120019 graphql:name "carModel"

The values of graphql:name must be valid GraphQL identifiers, i.e. not contain spaces or special characters. It's just an annotation property that doesn't really change your ontology - other tools will just ignore this triple.

You may need to edit the source code to add the triple above.

Holger

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/b825d2d5-6e52-466e-b134-4ba71452f061n%40googlegroups.com.

Fan Li

belum dibaca,
28 Jul 2020, 21.55.2528/07/20
kepadaTopBraid Suite Users
Thanks, Holger. This is exactly what I need.

Fan Li

belum dibaca,
28 Jul 2022, 14.23.2128/07/22
kepadaTopBraid Suite Users
Hi Holger, I am following up on this previous question regarding UUID URI and GraphQL. While using the graphql:name triple makes GraphQL query more readable, in ADS script the auto-generated API still uses the UUIDs as class names which is difficult to use. Any suggestions?

2022-07-28 142122.png

Holger Knublauch

belum dibaca,
28 Jul 2022, 14.39.5828/07/22
kepadatopbrai...@googlegroups.com
Hi Fan Li,

there is currently no way to control this further - the class name uses the local name only. You're right that it could potentially use graphql:name for that purpose and I have taken a note for that. But I haven't heard this need from other customers.

Holger


On 28 Jul 2022, at 2:23 pm, Fan Li <lifa...@gmail.com> wrote:

Hi Holger, I am following up on this previous question regarding UUID URI and GraphQL. While using the graphql:name triple makes GraphQL query more readable, in ADS script the auto-generated API still uses the UUIDs as class names which is difficult to use. Any suggestions?

Fan Li

belum dibaca,
28 Jul 2022, 15.33.5428/07/22
kepadaTopBraid Suite Users
Thanks, Holger. Customization via something like graphql:name or dash:className would it more user friendly. But I can live with the UUID class names for now.

Holger Knublauch

belum dibaca,
12 Agu 2022, 12.31.0712/08/22
kepadatopbrai...@googlegroups.com
FYI with 7.4 onwards it will be possible to customize the generated JS class name using graphql:name at the class/node shape.

Holger
Balas ke semua
Balas ke penulis
Teruskan
0 pesan baru