Kalle Kuhlmann
Kalle Kuhlmann•2w ago

Handle import "npm:..." prefix on generated code

Hey 👋 I have a file that is generated from a graphql schema, which has an import at the top not using the "npm:" prefix. As it is auto generated I can not change this from "graphql" to "npm:graphql" easily. Is there any work arround, to still use the file? Best, Kalle
2 Replies
marvinh.
marvinh.•2w ago
Sure, add this to your deno.json
{
"imports": {
"graphql": "npm:graphql@16.9.0"
}
}
{
"imports": {
"graphql": "npm:graphql@16.9.0"
}
}
Kalle Kuhlmann
Kalle Kuhlmann•2w ago
Aaaaawesome! Thank you very much.