babel-plugin-import-graphql icon indicating copy to clipboard operation
babel-plugin-import-graphql copied to clipboard

Runtime option does not seem to do anything

Open puchm opened this issue 3 years ago • 1 comments

Hi,

what does the runtime option actually do? I tried it with runtime set to true and to false but it doesn't seem to change anything. The transpiled file has the schema definition embedded as a string both times. I would have expected a different result when it is true.

This is my schema:

type Query {
    test: String
}

This is the transpiled file, both when runtime is true and when it's false:

"use strict";

var test = "\r\n\r\ntype Query {\r\n    test: String\r\n}";

Importing at runtime could be great for hot reloading in development environments.

Can you explain why it is the same both times?

Thanks for your help. -Moritz

puchm avatar May 17 '21 14:05 puchm

same here. and it is inlined as text instead of ast :(

terion-name avatar Sep 28 '21 20:09 terion-name