Apollo-tooling: Doesn't import GraphQL fragments

Created on 13 Feb 2017  Â·  3Comments  Â·  Source: apollographql/apollo-tooling

I'm following the fragment colocation suggestion as outlined here but apollo-codegen doesn't seem to be following the import.

Most helpful comment

I got it working, thanks guys. The tooling around GraphQL is amazing, I'm
so exited to be using it in my production app! I just signed up for Apollo
Optics as well, very exciting.

On Mon, Feb 13, 2017, 17:52 Sashko Stubailo notifications@github.com
wrote:

Yeah it should work just fine as long as you have apollo-codegen consume
all of your .graphql files, since the imports are carefully designed so
that other tools don't need to be aware of them.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/apollographql/apollo-codegen/issues/59#issuecomment-279550023,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACs0VJ3INiBfJB7kP6_g0IsS_kMZEWTpks5rcN7BgaJpZM4L_osl
.

All 3 comments

apollo-codegen doesn't currently support this Webpack loader #import syntax, but all .graphql files are concatenated and treated as one document, so you can still use fragments defined in other files.

Yeah it should work just fine as long as you have apollo-codegen consume all of your .graphql files, since the imports are carefully designed so that other tools don't need to be aware of them.

I got it working, thanks guys. The tooling around GraphQL is amazing, I'm
so exited to be using it in my production app! I just signed up for Apollo
Optics as well, very exciting.

On Mon, Feb 13, 2017, 17:52 Sashko Stubailo notifications@github.com
wrote:

Yeah it should work just fine as long as you have apollo-codegen consume
all of your .graphql files, since the imports are carefully designed so
that other tools don't need to be aware of them.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/apollographql/apollo-codegen/issues/59#issuecomment-279550023,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACs0VJ3INiBfJB7kP6_g0IsS_kMZEWTpks5rcN7BgaJpZM4L_osl
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lirbank picture lirbank  Â·  3Comments

lirbank picture lirbank  Â·  4Comments

u-ashish picture u-ashish  Â·  4Comments

rasmusprentow picture rasmusprentow  Â·  3Comments

justinanastos picture justinanastos  Â·  3Comments