tylim
01/07/2019, 12:02 PMnikolasburk
tylim
01/07/2019, 1:19 PMjackgray
01/07/2019, 5:14 PMnikolasburk
$subscribe property 🙂 what do you mean with "nested queries of arrays"? In general, anything that you can do with the bindings should also be possible with the client (except for schema delegation).jackgray
01/07/2019, 5:47 PMnikolasburk
$graphql or $fragment 🙂 Also note that it's likely that the client API will be adjusted and this will also be possible via the fluent API in the future 👍jackgray
01/07/2019, 5:51 PMnikolasburk
user({ id }).posts() or user({ id }).car().manufacturer(). $fragment and $graphql let you query Prisma by submitting fragments or GraphQL queries as strings. I think the code snippets on our website give a good overview on that, e.g. here https://www.prisma.io/client/client-typescript/jackgray
01/07/2019, 5:57 PMFran Dios
01/08/2019, 1:46 PMinfo object and don’t need to worry about anything else 🤷♂️
I think this feature was originally part of Client as well but was removed afterwards for some reason. I’d like to know if there is any problem or antipattern with this or is just to make it different from bindings. @nikolasburknikolasburk
info object which can be convenient sometimes
- The client on the other hand enables full type-safety for implementing resolvers (which you might not care about if you're using plain JS)
The Prisma client is the recommended approach because:
- We don't want that people need to understand schema delegation as a prerequisite for using Prisma
- The API of the client is more flexible and allows for other use cases than building GraphQL server
- We ❤️ type-safety 🙂Fran Dios
01/08/2019, 2:28 PM