The bool method isValid returns the document that starts with query or subscription or mutation
bool get isValid { return document.startsWith('query') || document.startsWith('subscription') || document.startsWith('mutation'); }