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

Export doesn't work #8

Open
SPAHI4 opened this issue Jul 5, 2017 · 4 comments
Open

Export doesn't work #8

SPAHI4 opened this issue Jul 5, 2017 · 4 comments

Comments

@SPAHI4
Copy link

SPAHI4 commented Jul 5, 2017

for example, I have a file: modules/my-module/index.js, where

export { default as schema } from './schema.graphqls';

and get

 var err = new SyntaxError(message);
            ^

Of course, I can do that

import schema from './schema.graphqls';
export { schema };

but it doesn't look good

@baloran
Copy link

baloran commented Jul 11, 2017

If you try without the "s" ? .graphql instead of .graphqls

@SPAHI4
Copy link
Author

SPAHI4 commented Jul 11, 2017

@baloran my config


    [
      "babel-plugin-inline-import",
      {
        "extensions": [
          ".graphql",
          ".graphqls"
        ]
      }
    ],

@baloran
Copy link

baloran commented Jul 11, 2017

And your schema ?

@NEO97online
Copy link

NEO97online commented Sep 24, 2018

I'm having the same issue.

export { default as cuponTypes } from './types.gql'
extend type Query {
  cupons: [Cupon]
}

extend type Mutation {
  claimCupon(user: String, cupon: String): CuponClaimed
}

type Cupon {
  id: String!
  name: String!
  creator: String
  value: Float
}

type CuponClaimed {
  message: String
  success: Boolean
}
SyntaxError: C:/Users/user/app/server/src/components/cupon/types.gql: Unexpected token, expected ; (1:7)
> 1 | extend type Query {
    |        ^
  2 |   cupons: [Cupon]
  3 | }
  4 |

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

No branches or pull requests

3 participants