Skip to content

Id type #2

@aymanbagabas

Description

@aymanbagabas

Hi,

Thanks for your great work.

I have an issue with IDs. We're using UUID in our Postgres DB and not Int. This causes a problem when fetching data from Postgraphile. Right now, ra-postgraphile-client uses hard-coded ID types (i.e Int) where parseId uses parseInt causes an UUID to be wrong.

Line 13 in build_query.js

My workaround is

  switch (raFetchType) {
    case 'GET_ONE':
      const idType = type.fields.find(t => t.name === "id").type.ofType.name
      return {
        query: gql`query ${resource[raFetchType].name}($id: ${idType}!) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions