@@ -12,7 +12,7 @@ import Data.List (List, fromFoldable, find)
1212import Data.Map (empty, insert, lookup)
1313import Data.Maybe (Maybe(..), fromMaybe)
1414import Data.Newtype (unwrap)
15−import Data.Symbol (class IsSymbol, SProxy(..), reflectSymbol)
15+import Data.Symbol (class IsSymbol, reflectSymbol)
1616import Data.Traversable (class Traversable, traverse)
1717import Data.Tuple (Tuple(..))
1818import Data.Variant as Variant
@@ -26,7 +26,7 @@ import GraphQL.Type.Introspection.Datatypes as IntrospectionTypes
2626import GraphQL.Type.ObjectType (Argument(..), ExecutableField(..), Field(..), ObjectType(..))
2727import GraphQL.Type.UnionType (UnionType(..), filterSelectionSet)
2828import Record as Record
29−import Type.Data.RowList (RLProxy(..))
29+import Type.Proxy (Proxy(..))
3030import Type.Row as Row
3131import Type.RowList as RL
3232import Unsafe.Coerce (unsafeCoerce)
@@ -177,12 +177,12 @@ nullableListField name t =
177177-- | ```purescript
178178-- | objectType "Query"
179179-- | :> field "hello" Scalar.string
180−-- | ?> arg Scalar.string (SProxy :: _ "name")
180+-- | ?> arg Scalar.string (Proxy :: _ "name")
181181-- | !> \{ name } parent -> pure $ "Hello " <> name
182182-- | ```
183−arg :: forall t a n. InputType t => IsSymbol n => t a -> SProxy n -> Tuple (SProxy n) (Argument a)
183+arg :: forall t a n. InputType t => IsSymbol n => t a -> Proxy n -> Tuple (Proxy n) (Argument a)
184184arg t _name =
185− Tuple (SProxy :: _ n) $
185+ Tuple (Proxy :: _ n) $
186186 Argument
187187 { description: Nothing
188188 , resolveValue: input t
@@ -200,7 +200,7 @@ arg t _name =
200200-- | ```purescript
201201-- | objectType "Query"
202202-- | :> field "hello" Scalar.string
203−-- | ?> optionalArg Scalar.string (SProxy :: _ "name")
203+-- | ?> optionalArg Scalar.string (Proxy :: _ "name")
204204-- | !> (\{ name } parent -> case name of
205205-- | Just n -> pure $ "Hello " <> name
206206-- | Nothing -> pure "Hello stranger"
@@ -211,10 +211,10 @@ optionalArg ::
211211 InputType t =>
212212 IsSymbol n =>
213213 t a ->
214− SProxy n ->
215− Tuple (SProxy n) (Argument (Maybe a))
214+ Proxy n ->
215+ Tuple (Proxy n) (Argument (Maybe a))
216216optionalArg t _name =
217− Tuple (SProxy :: _ n) $
217+ Tuple (Proxy :: _ n) $
218218 Argument
219219 { description: Nothing
220220 , resolveValue
@@ -245,7 +245,7 @@ inputObjectType name = InputObjectType \_ ->
245245 }
246246
247247
248−inputField :: forall t l a. IsSymbol l => InputType t => t a -> SProxy l -> InputField l a
248+inputField :: forall t l a. IsSymbol l => InputType t => t a -> Proxy l -> InputField l a
249249inputField inputType label = InputField
250250 { name: label
251251 , required: true
@@ -266,7 +266,7 @@ optionalInputField :: forall t l a.
266266 IsSymbol l =>
267267 InputType t =>
268268 t a ->
269− SProxy l ->
269+ Proxy l ->
270270 InputField l (Maybe a)
271271optionalInputField inputType label = InputField
272272 { name: label
@@ -426,7 +426,7 @@ instance argsDefToArgsParamImpl ::
426426 , ArgsFromRows largsd largsp argsd argsp
427427 , RL.ListToRow largsd argsd
428428 , RL.ListToRow largsp argsp ) => ArgsDefToArgsParam argsd argsp where
429− argsFromDefinition = argsFromRows (RLProxy :: RLProxy largsd) (RLProxy :: RLProxy largsp)
429+ argsFromDefinition = argsFromRows (Proxy :: Proxy largsd) (Proxy :: Proxy largsp)
430430
431431
432432-- | ArgsDefToArgsParam that works on row lists for matching implementations
@@ -437,8 +437,8 @@ class ArgsFromRows
437437 (argsp :: Row Type)
438438 where
439439 argsFromRows ::
440− RLProxy largsd ->
441− RLProxy largsp ->
440+ Proxy largsd ->
441+ Proxy largsp ->
442442 List AST.ArgumentNode ->
443443 ExecutionContext ->
444444 Record argsd ->
@@ -459,7 +459,7 @@ instance argsFromRowsCons ::
459459 argsp
460460 where
461461 argsFromRows _argsdProxy _argspProxy nodes variables argsd =
462− let key = SProxy :: SProxy l
462+ let key = Proxy :: Proxy l
463463 Argument argConfig = Record.get key argsd
464464 tailArgsDef = Record.delete key argsd :: Record targsd
465465 nameEquals (AST.ArgumentNode { name: AST.NameNode { value } }) =
@@ -472,8 +472,8 @@ instance argsFromRowsCons ::
472472 resolvedValue = lmap improveInputError $ argConfig.resolveValue valueNode variables
473473 tail =
474474 argsFromRows
475− (RLProxy :: RLProxy ltargsd)
476− (RLProxy :: RLProxy ltargsp)
475+ (Proxy :: Proxy ltargsd)
476+ (Proxy :: Proxy ltargsp)
477477 nodes
478478 variables
479479 tailArgsDef
@@ -495,7 +495,7 @@ withArgument :: forall m a arg n argsdold argsdnew argspold argspnew.
495495 ArgsDefToArgsParam argsdold argspold =>
496496 ArgsDefToArgsParam argsdnew argspnew =>
497497 Field m a argsdold argspold ->
498− Tuple (SProxy n) (Argument arg) ->
498+ Tuple (Proxy n) (Argument arg) ->
499499 Field m a argsdnew argspnew
500500withArgument (Field fieldConfig) (Tuple proxy argument) =
501501 Field $ fieldConfig { args = args', serialize = serialize', argumentIntrospections = intros' }
@@ -530,7 +530,7 @@ withArgument (Field fieldConfig) (Tuple proxy argument) =
530530-- | ```purescript
531531-- | objectType "Query"
532532-- | :> field "hello" Scalar.string
533−-- | ?> arg (SProxy :: SProxy "name") Scalar.string
533+-- | ?> arg (Proxy :: Proxy "name") Scalar.string
534534-- | !> (\{ name } parent -> "Hello " <> name <> "!")
535535-- | ```
536536infixl 7 withArgument as ?>
@@ -616,7 +616,7 @@ withInputField :: forall l a r1 r2.
616616withInputField (InputObjectType objConfig) (InputField inputConfig) = InputObjectType (\_ ->
617617 let
618618 config = (objConfig unit)
619− fieldLabel = (SProxy :: SProxy l)
619+ fieldLabel = (Proxy :: Proxy l)
620620 fieldName = reflectSymbol fieldLabel
621621
622622 -- This function calls the old input function recursively and then also reads the new field
@@ -706,11 +706,11 @@ instance unionDefinitionInstance ::
706706 , RL.ListToRow varRowList varRow ) => UnionDefinition defRow varRow ctx where
707707 union name defRecord =
708708 let
709− typeIntrospections = unionIntrospection (RLProxy :: RLProxy defRowList) defRecord
709+ typeIntrospections = unionIntrospection (Proxy :: Proxy defRowList) defRecord
710710 output selectionSetNode execCtx ctxValue = ctxValue >>=
711711 unionResolver
712− (RLProxy :: RLProxy defRowList)
713− (RLProxy :: RLProxy varRowList)
712+ (Proxy :: Proxy defRowList)
713+ (Proxy :: Proxy varRowList)
714714 defRecord
715715 selectionSetNode
716716 execCtx
@@ -723,7 +723,7 @@ class UnionIntrospection
723723 (defRow :: Row Type)
724724 where
725725 unionIntrospection ::
726− RLProxy defRowList ->
726+ Proxy defRowList ->
727727 Record defRow ->
728728 Array IntrospectionTypes.TypeIntrospection
729729
@@ -738,13 +738,13 @@ instance unionIntrospectionCons ::
738738 where
739739 unionIntrospection _ defRecord =
740740 let
741− ObjectType configFn = Record.get (SProxy :: SProxy l) defRecord
741+ ObjectType configFn = Record.get (Proxy :: Proxy l) defRecord
742742 config = configFn unit
743743 in
744744 -- Recursively call function
745745 Array.cons config.introspection $
746746 unionIntrospection
747− (RLProxy :: RLProxy defRowListTail)
747+ (Proxy :: Proxy defRowListTail)
748748 -- We will just read from this value
749749 (unsafeCoerce defRecord :: Record defRowTail)
750750
@@ -760,8 +760,8 @@ class UnionResolver
760760 (ctx :: Type -> Type)
761761 where
762762 unionResolver ::
763− RLProxy defRowList ->
764− RLProxy varRowList ->
763+ Proxy defRowList ->
764+ Proxy varRowList ->
765765 Record defRow ->
766766 Maybe AST.SelectionSetNode ->
767767 ExecutionContext ->
@@ -786,18 +786,18 @@ instance unionResolverCons ::
786786 ctx
787787 where
788788 unionResolver ::
789− RLProxy (RL.Cons l (ObjectType ctx a) defRowListTail) ->
790− RLProxy (RL.Cons l a varRowListTail) ->
789+ Proxy (RL.Cons l (ObjectType ctx a) defRowListTail) ->
790+ Proxy (RL.Cons l a varRowListTail) ->
791791 Record defRow ->
792792 Maybe AST.SelectionSetNode ->
793793 ExecutionContext ->
794794 (Variant.Variant varRow) ->
795795 ctx Result
796− unionResolver _defRLProxy _varRLProxy _defRecord Nothing _execCtx =
796+ unionResolver _defProxy _varProxy _defRecord Nothing _execCtx =
797797 const $ throwError $ error "Missing selection set for union type"
798− unionResolver _defRLProxy _varRLProxy defRecord (Just selection) execCtx =
798+ unionResolver _defProxy _varProxy defRecord (Just selection) execCtx =
799799 let
800− objectType@(ObjectType config) = Record.get (SProxy :: SProxy l) defRecord
800+ objectType@(ObjectType config) = Record.get (Proxy :: Proxy l) defRecord
801801 typename = (config unit).name
802802 filteredSelection = filterSelectionSet typename selection execCtx
803803 recResolver ::
@@ -805,14 +805,14 @@ instance unionResolverCons ::
805805 ctx Result
806806 recResolver =
807807 unionResolver
808− (RLProxy :: RLProxy defRowListTail)
809− (RLProxy :: RLProxy varRowListTail)
808+ (Proxy :: Proxy defRowListTail)
809+ (Proxy :: Proxy varRowListTail)
810810 (unsafeCoerce defRecord :: Record defRowTail)
811811 (Just selection)
812812 execCtx
813813 in
814814 recResolver
815− # Variant.on (SProxy :: SProxy l)
815+ # Variant.on (Proxy :: Proxy l)
816816 (pure >>> output objectType (Just filteredSelection) execCtx)
817817
818818else instance unionResolverNil :: Functor ctx => UnionResolver RL.Nil RL.Nil defRow varRow ctx where