Skip to content

cli: expand what files we watch in grafbase dev#1774

Merged
tomhoule merged 2 commits intomainfrom
gb-6881-live-reload-for-any-files-changes-in-local-dev
Jun 13, 2024
Merged

cli: expand what files we watch in grafbase dev#1774
tomhoule merged 2 commits intomainfrom
gb-6881-live-reload-for-any-files-changes-in-local-dev

Conversation

@tomhoule
Copy link
Copy Markdown
Contributor

The previous logic looks like this:

  • The file is schema.graphql, grafbase.config.ts or .env at the root, or inside a grafbase/ subdirectory

OR

  • The file is under grafbase/, resolvers/ or auth/
  • AND it isn't inside node_modules/, or generate/, or a lockfile
  • AND has one of the following extensions: "js", "ts", "jsx", "tsx", "mjs", "mts", "wasm", "cjs", "json", "yaml", "yml",

This commit expands the second branch of the conditional to any directory in the project (we still watch the same project root). There are new ignores for dist/ and target/ folders, since these tend to contain build artifacts rather than source files.

closes GB-6881

The previous logic looks like this:

- The file is schema.graphql, grafbase.config.ts or .env at the root, or inside a grafbase/ subdirectory

OR

- The file is under grafbase/, resolvers/ or auth/
- AND it isn't inside node_modules/, or generate/, or a lockfile
- AND has one of the following extensions: "js", "ts", "jsx", "tsx", "mjs", "mts", "wasm", "cjs", "json", "yaml", "yml",

This commit expands the second branch of the conditional to any directory in the project (we still watch the same project root). There are new ignores for dist/ and target/ folders, since these tend to contain build artifacts rather than source files.

closes GB-6881
@linear
Copy link
Copy Markdown

linear bot commented Jun 13, 2024

@tomhoule tomhoule mentioned this pull request Jun 13, 2024
@tomhoule tomhoule marked this pull request as ready for review June 13, 2024 14:50
@tomhoule tomhoule requested a review from a team as a code owner June 13, 2024 14:50
@tomhoule tomhoule requested a review from hfgbarrigas June 13, 2024 14:50
Copy link
Copy Markdown
Contributor

@yoav-lavi yoav-lavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@tomhoule tomhoule merged commit 729c409 into main Jun 13, 2024
@tomhoule tomhoule deleted the gb-6881-live-reload-for-any-files-changes-in-local-dev branch June 13, 2024 15:06
tomhoule added a commit that referenced this pull request Jun 13, 2024
Features

- You can now filter on text columns with the LIKE operator on the postgres connector (https://www.postgresql.org/docs/current/functions-matching.html). #1764
- The postgres connector now uses a connection pool instead of a single connection in `grafbase start`. #1771
- The postgres connector now supports multiple relations between two tables. See the pull request (#1770) for an example.
- Fixed a bug with enum values sent to subgraphs in `grafbase dev` for federated graphs. #1766
- Expand the scope of files watched for changes in `grafbase dev`. #1774
tomhoule added a commit that referenced this pull request Jun 13, 2024
Features

- You can now filter on text columns with the LIKE operator on the postgres connector (https://www.postgresql.org/docs/current/functions-matching.html). #1764
- The postgres connector now uses a connection pool instead of a single connection in `grafbase start`. #1771
- The postgres connector now supports multiple relations between two tables. See the pull request (#1770) for an example.
- Fixed a bug with enum values sent to subgraphs in `grafbase dev` for federated graphs. #1766
- Expand the scope of files watched for changes in `grafbase dev`. #1774
tomhoule added a commit that referenced this pull request Jun 13, 2024
Features

- You can now filter on text columns with the LIKE operator on the
postgres connector
(https://www.postgresql.org/docs/current/functions-matching.html). #1764
- The postgres connector now uses a connection pool instead of a single
connection in `grafbase start`. #1771
- The postgres connector now supports multiple relations between two
tables. See the pull request
(#1770) for an example.
- Fixed a bug with enum values sent to subgraphs in `grafbase dev` for
federated graphs. #1766
- Expand the scope of files watched for changes in `grafbase dev`. #1774
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants