Replies: 1 comment
-
By support graphql, do you mean accept graphql queries or schema? Either could be passed to an endpoint through the body of a request and parsed on the fly. In that case, you could use the text() function to parse the body of a request and pass it to your library to generate some code. using Oxygen
@post "/generate" function (req)
# parse the body as a string with the text() function
graphqlschema = text(req)
# todo: generate files from schema
return "created the files"
end Is this what you were talking about? Let me know if I'm way off base |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Very nice package!
I'd be interested in using it in conjunction with https://github.com/domluna/GraphQLGen.jl so that the server could support GraphQL. This does not mean adding GraphQLGen.jl to Oxygen.jl in any capacity, I'm thinking of something entirely orthogonal.
It looks like Oxygen integrates well with StructTypes.jl, which GraphQLGen.jl also uses.
I'm thinking it would look similar to https://github.com/ndortega/Oxygen.jl#deserialize--serialize-custom-structs but more involved?
Beta Was this translation helpful? Give feedback.
All reactions