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

GraphQL support for Deno

Open LaurenceM10 opened this issue 5 years ago • 8 comments
trafficstars

Feature requests

Deno was released a few days ago, is there any plan to support it? https://deno.land/v1

LaurenceM10 avatar May 20 '20 04:05 LaurenceM10

@LaurenceM10 Yes, it's planned 👍 And @hereisnaman did some preliminary testing for that. Our target is to add graphql module to this list: https://deno.land/x/ It's not a top priority at the moment but something that we want to do in the next few weeks.

IvanGoncharov avatar May 20 '20 16:05 IvanGoncharov

Ok. Thanks!

LaurenceM10 avatar May 20 '20 16:05 LaurenceM10

FWIW, it's already possible to use GraphQL in Deno by utilizing Pika CDN

import {
  GraphQLObjectType,
  GraphQLSchema,
  GraphQLString,
} from "https://cdn.pika.dev/graphql@^15.0.0";

Here's a full example using the middleware I wrote for the ABC framework.

danielrearden avatar Jun 03 '20 00:06 danielrearden

@danielrearden This isn't working anymore:

The requested module '/-/[email protected]/dist=es2019/graphql.js' does not provide an export named 'default'

mlow avatar Jun 04 '20 19:06 mlow

@danielrearden This isn't working anymore:

The requested module '/-/[email protected]/dist=es2019/graphql.js' does not provide an export named 'default'

I ran into the same issue. On reddit I learned that it's possible to use the URL from the error message as a work around.

import { graphql, buildSchema } from "https://cdn.pika.dev/-/[email protected] Lwp7DcGGGn15gbf/dist=es2019/graphql.js";

dardanbujupaj avatar Jun 04 '20 23:06 dardanbujupaj

Does anyone have the link to DENO package I could not find it ?

khanakia avatar Apr 20 '22 18:04 khanakia

Hi. Would it be possible for a maintainer to provide some context on where the project currently is re. Deno support? I see various mentions of Deno in commits, branches etc but can't make out the overall picture. Is support for Deno still something that's being worked on?

Using a CDN like https://cdn.skypack.dev/graphql?dts seems to be working well...

rossholdway avatar Jun 26 '22 21:06 rossholdway

So we publish under deno branch here https://github.com/graphql/graphql-js/tree/deno which if you import should work

saihaj avatar Jun 27 '22 01:06 saihaj

Thanks to all the work that has been done here, If anyone wants to use a modern GraphQL framework with Deno, Yoga Server now fully supports Deno without you needing to change anything about how you write your code

Urigo avatar Oct 15 '22 13:10 Urigo