Just wondering if anyone has looked at implementing GraphQL in Lucee (and or ColdFusion).
I came across these repositories for Java:
The servlet above has OSGI support. I know nothing about implementing/creating extensions with Lucee so am interested if anyone here could take a look and see if it should be feasible. I’d love to help contribute if it was indeed possible.
I reckon GraphQL support would be a big leg up for Lucee if it was supported.
I have been looking into it , don’t worry about the servlet but the java version. (servlet is just for mappings). I don’t think it needs to be an extension per se (I might be wrong there) since there are a number of domain specific actions you have to do. I did a few presentations on calling GraphQL from lucee but I have my side project on creating an implementation based on the java version.
I dont think I have made them public as they have a bunch of videos so it becomes a pain. The code is not even ready as it was just a way to think about how GraphQL could work in CFML (rather than an actuality)
I shall have another look at it and see if I can get a first pass out there, but if you want to know how to do it in java you can see here:
My example code is this:
query = URL.query;
result = new GraphQL()
.setSchema("/myschema.graphqls")
.resolvers({
"Query", new Query(),
"Mutation", new Mutator(),
});
.build()
.execute(query);
writeDump(result);
I just uploaded a version of my presentation to SlideShare:
Eric Peterson was working on a proof of concept for GraphQL when we were at CFSummit, but he’s not in Discourse so I can’t tag him. He is, however, sitting next to me at this CFCamp session, so I’ll just bug him directly.
Sure. The handlers/StarWars.cfc doesn’t have any dependencies on ColdBox. It’s using ColdBox to run the app because I find that the easiest way to do things. The handlers/StarWarsTwo.cfc was my attempt at simplifying the Java setup using ColdBox and WireBox.