fn parse_operation_type(&mut self) -> ParseResult<OperationType> {
        let token = self.parse_kind(TokenKind::Identifier)?;
        match self.source(&token) {
            "query" => Ok(OperationType::Query),
            "mutation" => Ok(OperationType::Mutation),
            "subscription" => Ok(OperationType::Subscription),
            token_str => {
                let error = Diagnostic::error(
                    format!(
                        "Expected one of `query`, `mutation`, `subscription`, got `{}`",
                        token_str
                    ),
                    Location::new(self.source_location, token.span),
                );
                self.record_error(error);
                Err(())
            }
        }
    }
/**
     * OperationType : one of query mutation subscription
     */
OperationType : one of query mutation subscription
OperationType : one of query mutation subscription
fn parse_operation_type(&mut self) -> ParseResult<OperationType> {
        let token = self.parse_kind(TokenKind::Identifier)?;
        match self.source(&token) {
            "query" => Ok(OperationType::Query),
            "mutation" => Ok(OperationType::Mutation),
            "subscription" => Ok(OperationType::Subscription),
            token_str => {
                let error = Diagnostic::error(
                    format!(
                        "Expected one of `query`, `mutation`, `subscription`, got `{}`",
                        token_str
                    ),
                    Location::new(self.source_location, token.span),
                );
                self.record_error(error);
                Err(())
            }
        }
    }
fn parse_operation_type ( & mut self ) -> ParseResult < OperationType > { let token = self . parse_kind ( TokenKind :: Identifier ) ? ; match self . source ( & token ) { " " => Ok ( OperationType :: Query ) , " " => Ok ( OperationType :: Mutation ) , " " => Ok ( OperationType :: Subscription ) , token_str => { let error = Diagnostic :: error ( format ! ( " " token_str ) , Location :: new ( self . source_location , token . span ) , ) ; self . record_error ( error ) ; Err ( ( ) ) } } }
OperationType : one of query mutation subscription
OperationType : one of query mutation subscription
&mut self
&mut self