pothos icon indicating copy to clipboard operation
pothos copied to clipboard

docs: add federation + Prisma usage guidance

Open macrozone opened this issue 7 months ago • 2 comments

Summary

  • Documents common issue with field selection in resolveReference when using federation plugin with Prisma
  • Exposed fields (t.exposeString(), t.exposeInt(), etc.) are not automatically included in select, causing reference resolution failures across subgraphs
  • Provides solution using queryFromInfo to automatically determine required fields based on GraphQL query information

Changes

  • Added new "Usage with Prisma" section to federation plugin documentation
  • Includes problem example showing the issue
  • Provides recommended solution using queryFromInfo from @pothos/plugin-prisma

Test plan

  • [x] Documentation is clear and follows existing patterns
  • [x] Code examples are syntactically correct
  • [x] Solution addresses the reported issue

Fixes #1321

🤖 Generated with Claude Code

macrozone avatar Sep 08 '25 08:09 macrozone

⚠️ No Changeset found

Latest commit: b5105f00bed562cb1107a078bc7dbcfa6158498e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Sep 08 '25 08:09 changeset-bot[bot]

@macrozone is attempting to deploy a commit to the Michael Hayes' projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Sep 08 '25 08:09 vercel[bot]