/** * Helper function to test a query and the expected response. */ private function validationErrors($query) { $ast = Parser::parse($query); return DocumentValidator::validate(StarWarsSchema::build(), $ast); }
/** * Helper function to test a query and the expected response. */ private function assertValidQuery($query, $expected) { $this->assertEquals(['data' => $expected], GraphQL::execute(StarWarsSchema::build(), $query)); }
/** * Helper function to test a query with params and the expected response. */ private function assertValidQueryWithParams($query, $params, $expected) { $this->assertEquals(['data' => $expected], GraphQL::execute(StarWarsSchema::build(), $query, null, null, $params)); }