Skip to content
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

Make note of keepGraphqlFileExtension changing in README #40

Open
ELepolt opened this issue Dec 17, 2019 · 1 comment
Open

Make note of keepGraphqlFileExtension changing in README #40

ELepolt opened this issue Dec 17, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@ELepolt
Copy link

ELepolt commented Dec 17, 2019

From ember-apollo-client:

DEPRECATION: [ember-apollo-client] Deprecation:
        The configuration option keepGraphqlFileExtension was not defined.
        The current default is 'false', but it will change to 'true' after the next major release.
        This option allows you to import graphql files using its extension. eg. 'import myQuery from 'my-app/queries/my-query.graphql';'
        To continue with the current behavior, explicit set it to 'false' in your 'ember-cli-build.js'.
        Please refer to 'Build time configuration' section in ember-apollo-client's README for more information.

Since this deprecation is listed I had already changed keepGraphqlFileExtension to 'true' in my ember-cli-build, which was causing the import schema to fail.

import schema from 'app-name/path-to-your-schema';

Needed to be

import schema from 'app-name/path-to-your-schema.graphql';

This took me entirely too long to realize, and thought it might be nice to make a mention to it since ember-apollo will be changing.

@jneurock jneurock added the enhancement New feature or request label Dec 18, 2019
@jneurock
Copy link
Contributor

Good observation. Thanks!

I've seen this, too. I tried to update the dummy app accordingly; however, this new import style doesn't work with some older versions of Ember. I decided not to change anything for now.

I don't know why it doesn't just work but it hasn't been important enough for me to dig deeply into the problem. If I can find some time to figure out the problem, I can update the README and the dummy app as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants