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

Simple & fast way of querying data (#83) #84

Closed

Conversation

dimitri-koenig
Copy link

@dimitri-koenig dimitri-koenig commented Jul 14, 2017

See #83

@Samuell1
Copy link

Samuell1 commented Jul 14, 2017

This is cool! But there needs to be a global variable how to enabled/disabled it because i importing *.graphql files into query then i dont need gql

@dimitri-koenig
Copy link
Author

Hm, how does importing graphql files affect this additional non-breaking change/improvement? Why adding a global switch for a feature which could not possibly be used before and is therefore totally optional?

@Samuell1
Copy link

Samuell1 commented Jul 15, 2017

If you use webpack you can separate queries from logic in files http://dev.apollodata.com/react/webpack.html , they are actually with gql, then i can simply import file what i need to use in query

Example:

import MyQuery from './MyQuery.graphql'

apollo: {
  ping: {
    query: MyQuery,
    variables: {
      message: 'Meow',
    },
  },
},

@dimitri-koenig
Copy link
Author

So it's more about wether you want to import gql or not, right?

What about lazy requiring gql?

@Akryum Akryum closed this Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants