The docs are light in this area, I do this extensively in a closed source project though. If you are using VSCode or another IDE with autocompletion support, you can prompt it for valid syntax at each step of your query. It's difficult to suggest without a schema.