Open baconcheese113 opened 2 years ago
Hi. For now Artemis supports only extracting graphql queries. There is no major plans to change the approach for now.
Do you know if Artemis works with Fragments? If it does I'd be able to continue using Fragments and just have typing in the first Widget where I have the Query I suppose.
Also, do I have to put my queries in separate files for Artemis to find them or is there a way Artemis can parse them out?
Yes it works with fragments check the readme
I use graphql client side in Flutter very similar to how I use it with Apollo Client and Relay, where each Widget/Component houses the parts of the query that will be used in it's widget and child widgets have their own fragments. You can see an example of one of my main queries here and here.
In Relay I would type each prop containing the fragment query response in that specific component with the type generated for the fragment, the types are then placed in the file's folder in a generated folder. Based on the example apps I've looked at it seems like the queries have to be extracted to their own files, is that right? Is there a way to get something similar to Relay/Apollo Client where the graphql fragments live in the same files as the component that uses them with Artemis?