I was thinking of writing an API that does the following things:
- Sign-up and sign-in users which provide the user with an authentication token
- Create maps (data example:
{ name: “Quotes”, attributes: [“quote”, “author"] }
) - Create map items (data example:
{ quote: "...", author: "..." }
)
I would build the queries somewhat like this:
// return the name and id of all the user's maps
maps(authToken="…") {
name,
id
}
// return all the items of a single map
maps(authToken="…") {
map(name=“Quotes") {
items
}
}
// OR by using the map_id
maps(authToken="…") {
map(id=“…") {
items
}
}
So, my question is, is this correct or would I need to structure it differently?