Skip to content

Changes in a .graphql file doesn't recompile automatically #5744

Closed
@glennreyes

Description

@glennreyes

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

graphql, import, reload

Environment

Environment Info:

  System:
    OS: macOS 10.14
    CPU: x64 Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz
  Binaries:
    Node: 11.1.0 - /usr/local/bin/node
    Yarn: 1.12.1 - /usr/local/bin/yarn
    npm: 6.4.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 70.0.3538.77
    Firefox: 61.0.1
    Safari: 12.0
  npmPackages:
    react: ^16.6.1 => 16.6.1 
    react-dom: ^16.6.1 => 16.6.1 
    react-scripts: 2.1.1 => 2.1.1 
  npmGlobalPackages:
    create-react-app: Not Found

Steps to Reproduce

  1. Install following deps:
yarn add graphql.macro graphql
  1. Add src/test.graphql:
type Query {
  hello: String
}
  1. Import graphql file:
import { loader } from 'graphql.macro'
const test = loader('./test.graphql')
  1. Add changes to src/test.graphql, eg replace content with:
type Query {
  bye: String
}

Expected Behavior

Bundler recompiles / App reloads

Actual Behavior

Bundler does not recompile / App does not reload

Reproducible Demo

https://codesandbox.io/s/z6yjkp4l4m

Please download from codesandbox since it's only reproducible locally.

Related: #5076, #4893, #3909, #1792

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions