morpheus-graphql icon indicating copy to clipboard operation
morpheus-graphql copied to clipboard

Please Help ! This code does not compile

Open jmikedupont2 opened this issue 2 years ago • 4 comments

this introduces the metacoq types but still not deriving.

error is :

/mnt/data1/2023/07/22/morpheus-graphql/examples/scotty/src/Server/Mythology/API.hs:112:7: error: • No instance for (morpheus-graphql-server-0.27.3:Data.Morpheus.Server.Deriving.Utils.GRep.GRep GQLType (morpheus-graphql-server-0.27.3:Data.Morpheus.Server.Types.GQLType.GQLResolver (morpheus-graphql-app-0.27.3:Data.Morpheus.App.Internal.Resolving.Resolver.Resolver morpheus-graphql-core-0.27.3:Data.Morpheus.Types.Internal.AST.OperationType.QUERY () IO)) (morpheus-graphql-app-0.27.3:Data.Morpheus.App.Internal.Resolving.Resolver.Resolver morpheus-graphql-core-0.27.3:Data.Morpheus.Types.Internal.AST.OperationType.QUERY () IO (morpheus-graphql-app-0.27.3:Data.Morpheus.App.Internal.Resolving.Types.ResolverValue (morpheus-graphql-app-0.27.3:Data.Morpheus.App.Internal.Resolving.Resolver.Resolver morpheus-graphql-core-0.27.3:Data.Morpheus.Types.Internal.AST.OperationType.QUERY () IO))) (GHC.Generics.Rep (Prod Global_env Term))) arising from a use of ‘deriveApp’ • In the expression: deriveApp rootResolver In an equation for ‘app’: app = deriveApp rootResolver | 112 | app = deriveApp rootResolver | ^^^^^^^^^

jmikedupont2 avatar Jul 23 '23 14:07 jmikedupont2

Please do not merge, this is a request for help but I thought it would be easier to represent my question in the form of a PR. I am just learning this system please be patient with me.

jmikedupont2 avatar Jul 23 '23 14:07 jmikedupont2

no. worries. i will look on it (but cant promise it will be soon)

nalchevanidze avatar Jul 27 '23 14:07 nalchevanidze

I have been working on resolving this by breaking down the types. I think it has to do with product types of the form (Pair a b) where I have to add rules to derive the code. RIght now I am looking into using template haskell to build the right things but I am still struggling on how to do this, it is quite the advanced topic. any tips would be appreciated. Essentially I want to generate a GQL from an existing inductive type hierarchy and I would like to save it to a file. I know it should derive automatically. right now I am digging into https://github.com/vacationlabs/record-splicer in the hopes of slicing my huge data types into smaller records that might be digestable.

Do you have a slack or irc channel or some other communication channel? thanks, mike

On Thu, Jul 27, 2023, 10:48 David Nalchevanidze @.***> wrote:

no. worries. i will look on it (but cant promise it will be soon)

— Reply to this email directly, view it on GitHub https://github.com/morpheusgraphql/morpheus-graphql/pull/842#issuecomment-1653773529, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD5KQ2MHHKP4ULX4WFY2UA3XSJ5TJANCNFSM6AAAAAA2UR3NTE . You are receiving this because you authored the thread.Message ID: @.***>

jmikedupont2 avatar Jul 27 '23 15:07 jmikedupont2

Yeah guys is there any way that we can construct a graphql schema from a template Haskell structure

On Tue, Jun 11, 2024, 07:14 David Nalchevanidze @.***> wrote:

Reopened #842 https://github.com/morpheusgraphql/morpheus-graphql/pull/842.

— Reply to this email directly, view it on GitHub https://github.com/morpheusgraphql/morpheus-graphql/pull/842#event-13115475568, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD5KQ2LHTSSWN4YKBKY7YZTZG3L2FAVCNFSM6AAAAABJEDQRMKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGEYTKNBXGU2TMOA . You are receiving this because you authored the thread.Message ID: @.*** com>

jmikedupont2 avatar Jun 11 '24 15:06 jmikedupont2