GraphQL


#1

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.


#2

Hi Bill,

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.

MD


#3

Hi Mark,

Are your presentations available somewhere and/or your side project?


#4

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:
https://www.howtographql.com/graphql-java/0-introduction/

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:
https://www.slideshare.net/secret/qq5aa82zY1OwYs


#5

@markdrew Did you get some time on your side project? Will it be open source? If so, can I get private beta access :wink:


#6

Alas not recently. Has been a while since I touched it since I have been doing some cfconfig additions instead (as side projects)