-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to import graphql - library seems to be completely broken #547
Comments
Hi @jtiai , Seems the https://unpkg.com/graphql@16.6.0/graphql.js file has not exported the
hope can help you. : ) |
The catch is that plain graphql import is being widely used by many 3rd party packages which I can't change. |
Okay, I found the problem that is due to an import file conflict, fixing it. |
@jtiai We has been fixed the entry point bug, could you please try again? |
After doing some work with imports I hit an another error:
And that module is imported from quite many places. |
@jtiai Could you please share your full use case? |
This is MVP which triggers the error: import { GraphQLScalarType, ValueNode } from "https://esm.sh/graphql@16.6.0/type/index.mjs";
import { Kind } from "https://esm.sh/graphql@16.6.0/language/kinds.mjs";
const dateTimeScalar = new GraphQLScalarType({
name: "DateTime",
description: "Date and time scalar type",
serialize(value: unknown): string {
return (value as string); // REST API sends timestamps as ISO strings already
},
parseValue(value: unknown): Date {
return new Date(value as string); // Convert ISO date string to Date
},
parseLiteral(ast: ValueNode): Date | null {
if (ast.kind === Kind.STRING) {
return new Date(ast.value); // Do not change incoming string
}
return null; // Something fishy
},
}); |
@jtiai please remove import { GraphQLScalarType, ValueNode } from "https://esm.sh/graphql@16.6.0/type/index";
import { Kind } from "https://esm.sh/graphql@16.6.0/language/kinds"; |
I guess that worked but now I get schema errors. For some reasons this is only thing that so far works: import { GraphQLScalarType, Kind, ValueNode } from "npm:graphql@^16.6.0"; |
This happens on v130 when importing different parts of graphql:
|
Failing module
Error message
After running
deno run
I got this:Additional info
deno 1.31.2 (release, aarch64-apple-darwin)
v8 11.0.226.19
typescript 4.9.4
Module used to work until about 8th of March 2023. After that Deno actually complained about hash change and after reloading everything error started to appear.
The text was updated successfully, but these errors were encountered: