Defining fragments should be rather simple. We can add a new fragment macro and parse similarly to how we parse queries or mutations:
But we need to figure out some nice valid syntax for including a fragment in your query or in other fragments:
query "FetchUser" do
user(id: "abc") do
birthday
# 👇 How do we define this??
...UserData
end
end
fragment "UserData", on: "User" do
id
label
end
Defining fragments should be rather simple. We can add a new
fragmentmacro and parse similarly to how we parse queries or mutations:But we need to figure out some nice valid syntax for including a fragment in your query or in other fragments: