I'm using the same field called
Linkin multiple collections. I'm creating the field with the Field type from payload/types. I'm importing that field in the collections where I'm using it. I'm also using the same field in blocks. My problem now is, that payload doesn't generate types for that field and when querying a collection and it's blocks where multiple blocks use that
Linkfield, I'm getting a conflict error.
So basically I have multiple types for the same field. Like
Block1_Link,
Block2_Link,
Block3_Link. Instead I should have
Linkas the type, anytime I use the field
Link.
Any idea how to solve this?
What is the error specifically? I can understand how this would be a problem, but I'm not sure the solution and seeing the error would help.
{"message": "Fields \"link\" conflict because subfields \"type\" conflict because they return conflicting types \"Hero1_Link_type\" and \"Hero2_Link_type\" and subfields \"subtype\" conflict because they return conflicting types \"Hero1_Link_subtype\" and \"Hero2_Link_subtype\" and subfields \"coll\" conflict because they return conflicting types \"Hero1_Link_coll\" and \"Hero2_Link_coll\" and subfields \"rel\" conflict because they return conflicting types \"Hero1_Link_rel\" and \"Hero2_Link_rel\" and subfields \"target\" conflict because they return conflicting types \"Hero1_Link_target\" and \"Hero2_Link_target\" and subfields \"referrerpolicy\" conflict because they return conflicting types \"Hero1_Link_referrerpolicy\" and \"Hero2_Link_referrerpolicy\". Use different aliases on the fields to fetch both if this was intentional."}
yes, we are releasing a new way to "flatten" the GraphQL types into a single reusable interface
@dribbens we should release that feature ASAP and then comment here
Aye, good call!
Nice. Thanks for help guys.
OK 1.9.0 has it.
Thanks for being patient.
@rene.k3 Give it a shot and let us know
@dribbens It's awesome. It works great. I like the solution. Thanks for the quick turnaround.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.