File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 11<?php
22namespace GraphQL \Type \Definition ;
33
4+ use GraphQL \Error \Error ;
45use GraphQL \Error \InvariantViolation ;
5- use GraphQL \Error \UserError ;
66use GraphQL \Language \AST \FloatValueNode ;
77use GraphQL \Language \AST \IntValueNode ;
88use GraphQL \Utils \Utils ;
@@ -63,7 +63,7 @@ private function coerceFloat($value, $isInput)
6363 $ isInput ? Utils::printSafeJson ($ value ) : Utils::printSafe ($ value )
6464 );
6565 }
66- throw ($ isInput ? new UserError ($ err ) : new InvariantViolation ($ err ));
66+ throw ($ isInput ? new Error ($ err ) : new InvariantViolation ($ err ));
6767 }
6868
6969 /**
Original file line number Diff line number Diff line change 11<?php
22namespace GraphQL \Type \Definition ;
33
4+ use GraphQL \Error \Error ;
45use GraphQL \Error \InvariantViolation ;
5- use GraphQL \Error \UserError ;
66use GraphQL \Language \AST \IntValueNode ;
77use GraphQL \Language \AST \StringValueNode ;
88use GraphQL \Utils \Utils ;
@@ -65,7 +65,7 @@ public function parseValue($value)
6565 return 'null ' ;
6666 }
6767 if (!is_scalar ($ value )) {
68- throw new UserError ("ID type cannot represent non scalar value: " . Utils::printSafeJson ($ value ));
68+ throw new Error ("ID type cannot represent non scalar value: " . Utils::printSafeJson ($ value ));
6969 }
7070 return (string ) $ value ;
7171 }
Original file line number Diff line number Diff line change 11<?php
22namespace GraphQL \Type \Definition ;
33
4+ use GraphQL \Error \Error ;
45use GraphQL \Error \InvariantViolation ;
5- use GraphQL \Error \UserError ;
66use GraphQL \Language \AST \IntValueNode ;
77use GraphQL \Utils \Utils ;
88
@@ -57,7 +57,7 @@ public function parseValue($value)
5757 */
5858 private function coerceInt ($ value , $ isInput )
5959 {
60- $ errClass = $ isInput ? UserError ::class : InvariantViolation::class;
60+ $ errClass = $ isInput ? Error ::class : InvariantViolation::class;
6161
6262 if ($ value === '' ) {
6363 throw new $ errClass (
Original file line number Diff line number Diff line change 11<?php
22namespace GraphQL \Type \Definition ;
3+ use GraphQL \Error \Error ;
34use GraphQL \Error \InvariantViolation ;
4- use GraphQL \Error \UserError ;
55use GraphQL \Utils \Utils ;
66
77
@@ -133,7 +133,7 @@ public function getField($name)
133133 $ this ->getFields ();
134134 }
135135 if (!isset ($ this ->fields [$ name ])) {
136- throw new UserError (sprintf ("Field '%s' is not defined for type '%s' " , $ name , $ this ->name ));
136+ throw new Error (sprintf ("Field '%s' is not defined for type '%s' " , $ name , $ this ->name ));
137137 }
138138 return $ this ->fields [$ name ];
139139 }
Original file line number Diff line number Diff line change 11<?php
22namespace GraphQL \Type \Definition ;
33
4+ use GraphQL \Error \Error ;
45use GraphQL \Error \InvariantViolation ;
5- use GraphQL \Error \UserError ;
66use GraphQL \Language \AST \StringValueNode ;
77use GraphQL \Utils \Utils ;
88
@@ -62,7 +62,7 @@ public function parseValue($value)
6262 return 'null ' ;
6363 }
6464 if (!is_scalar ($ value )) {
65- throw new UserError ("String cannot represent non scalar value: " . Utils::printSafe ($ value ));
65+ throw new Error ("String cannot represent non scalar value: " . Utils::printSafe ($ value ));
6666 }
6767 return (string ) $ value ;
6868 }
You can’t perform that action at this time.
0 commit comments