lolopinto / ent

MIT License
51 stars 6 forks source link

UUID fields in Structs do not get GraphQL encoded #1762

Open Swahvay opened 8 months ago

Swahvay commented 8 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 8 months ago

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