diff --git a/morpheus-graphql-code-gen-utils.cabal b/morpheus-graphql-code-gen-utils.cabal
--- a/morpheus-graphql-code-gen-utils.cabal
+++ b/morpheus-graphql-code-gen-utils.cabal
@@ -1,11 +1,11 @@
 cabal-version: 1.12
 
--- This file has been generated from package.yaml by hpack version 0.35.0.
+-- This file has been generated from package.yaml by hpack version 0.36.0.
 --
 -- see: https://github.com/sol/hpack
 
 name:           morpheus-graphql-code-gen-utils
-version:        0.27.3
+version:        0.28.0
 synopsis:       Morpheus GraphQL CLI
 description:    code generator for Morpheus GraphQL
 category:       web, graphql, cli
@@ -40,9 +40,9 @@
   ghc-options: -Wall
   build-depends:
       base >=4.7.0 && <5.0.0
-    , bytestring >=0.10.4 && <0.12.0
-    , containers >=0.4.2.1 && <0.7.0
-    , morpheus-graphql-core >=0.27.0 && <0.28.0
+    , bytestring >=0.10.4 && <0.15.0
+    , containers >=0.4.2.1 && <=0.7
+    , morpheus-graphql-core >=0.28.0 && <0.29.0
     , mtl >=2.0.0 && <3.0.0
     , prettyprinter >=1.7.0 && <2.0.0
     , relude >=0.3.0 && <2.0.0
diff --git a/src/Data/Morpheus/CodeGen/TH.hs b/src/Data/Morpheus/CodeGen/TH.hs
--- a/src/Data/Morpheus/CodeGen/TH.hs
+++ b/src/Data/Morpheus/CodeGen/TH.hs
@@ -200,7 +200,10 @@
 #endif
 
 {- ORMOLU_DISABLE -}
-#if MIN_VERSION_template_haskell(2,17,0)
+#if MIN_VERSION_template_haskell(2,21,0)
+toTypeVars :: [Name] -> [TyVarBndr BndrVis]
+toTypeVars = map (flip PlainTV BndrReq)
+#elif MIN_VERSION_template_haskell(2,17,0)
 toTypeVars :: [Name] -> [TyVarBndr ()]
 toTypeVars = map (flip PlainTV ())
 #else
