Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostGraphileRelayPreset does not eliminate Row in ByRowId #2082

Open
benjie opened this issue Jun 4, 2024 · 0 comments
Open

PostGraphileRelayPreset does not eliminate Row in ByRowId #2082

benjie opened this issue Jun 4, 2024 · 0 comments
Labels

Comments

@benjie
Copy link
Member

benjie commented Jun 4, 2024

Extracted from #2077.


PostGraphileRelayPreset is suggested as a way to hide the ugly rowId from your schema. This does work. However, connections are still generated using the ByRowId syntax. Even worse, it seems generated ByRowId connections do not actually expect the rowId after enabling PostGraphileRelayPreset! Instead, the value returned from the id is expected. This becomes confusing very quickly.

Current:

mutation {
  createIndividual(
    input: {individual: {profileByRowId: "WyJQcm9maWxlIiwiZjVmOWNiNWEtN2Y1Mi00MzgyLWE3ZDgtMzdkOWZhY2Q5NjJkIl0="}}
  ) {
    individual {
      id
    }
  }
}

Expected

mutation {
  createIndividual(
    input: {individual: {profileById: "WyJQcm9maWxlIiwiZjVmOWNiNWEtN2Y1Mi00MzgyLWE3ZDgtMzdkOWZhY2Q5NjJkIl0="}}
  ) {
    individual {
      id
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🐭 Shrew
Development

No branches or pull requests

1 participant