Is there any way to use GraphQL Fragments with Pri...
# orm-help
o
Is there any way to use GraphQL Fragments with Prisma 2. I do not like to use "include" options as nested queries with separate query definition provide you as much depth as you want. I saw in some tutorials to use Fragments with Prisma 1 (graphql-bindings) but not sure about Prisma 2.
r
@Orkhan Rustamli 👋 If what you’re looking for is
prisma.$fragment
then that is possible with
include
or
select
as that provides better type-safety than
prisma.$fragment
as that used strings instead of actual object. We also have an example where a similar thing that you used to do with Prisma 1 fragments that can be done with Prisma 2