lolopinto / ent

MIT License
52 stars 6 forks source link

UUID fields in Structs do not get GraphQL encoded #1762

Closed Swahvay closed 2 weeks ago

Swahvay commented 9 months ago

As the title says. A sample returned from a graphQL query from the following field definition:

horses: StructTypeAsList({
  tsType: 'CompetitionEventHorseEntry',
  fields: {
    horseId: UUIDType({
      nullable: true,
      foreignKey: {
        schema: 'Horse',
        column: 'ID',
      },
    }),
    horseName: TextType({
      nullable: true,
      maxLen: 200,
    }),
  },
}),
"id": "bm9kZTpjb21wZXRpdGlvbkV2ZW50OjdhZTQxMWMwLTViNzYtNDZiYi04OWQxLWI0YTU3MjM4MWU2Ng==",
"entries": {
  "nodes": [
    {
      "horses": [
        {
          "horseId": "019b6ffb-ca2d-4698-8999-51a544c1f8da",
          "horseName": null
        }
      ],
    },
  ],
},
Swahvay commented 9 months ago

In fact, these should be Node types in GraphQL, right?