Skip to content

Commit

Permalink
Note need to rerun codegen when schema changes (#1050)
Browse files Browse the repository at this point in the history
  • Loading branch information
scotttrinh authored Jul 3, 2024
1 parent 9bb1a27 commit 2a9bec4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
6 changes: 5 additions & 1 deletion docs/generation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ TypeScript/JavaScript.
To get started with generators, first initialize an :ref:`EdgeDB project
<ref_guide_using_projects>` in the root of your application. Generators will
look for an ``edgedb.toml`` file to determine the root of your application. See
the :ref:`Overview <edgedb-js-installation>` page for details on installing
the :ref:`Overview <edgedb-js-installation>` page for details on installing.

.. note::

Generators work by connecting to the database to get information about the current state of the schema. Make sure you run the generators again any time the schema changes so that the generated code is in-sync with the current state of the schema.

Run a generator with the following command.

Expand Down
7 changes: 5 additions & 2 deletions docs/interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,11 @@ This will introspect your schema and generate TypeScript interfaces that corresp
actors: Person[];
}
Any types declared in a non-``default`` module will be generated into an
accordingly named ``namespace``.
Any types declared in a non-``default`` module will be generated into an accordingly named ``namespace``.

.. note::

Generators work by connecting to the database to get information about the current state of the schema. Make sure you run the generators again any time the schema changes so that the generated code is in-sync with the current state of the schema.


Customize file path
Expand Down
6 changes: 5 additions & 1 deletion docs/queries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ We can now use this function in our code.
user.email; // string
}
.. note::

Generators work by connecting to the database to get information about the current state of the schema. Make sure you run the generators again any time the schema changes so that the generated code is in-sync with the current state of the schema.


Single-file mode
----------------
Expand Down Expand Up @@ -274,4 +278,4 @@ However, it's better practice to declare it once by assigning it to a variable i
and reference that variable in the rest of your query. This way you avoid mismatched types in your declarations,
such as forgetting to mark them all as `optional </docs/edgeql/parameters#optional-parameters>`__.

Check out the `EdgeQL docs </docs/edgeql/index>`__ to learn more about writing queries.
Check out the `EdgeQL docs </docs/edgeql/index>`__ to learn more about writing queries.
4 changes: 4 additions & 0 deletions docs/querybuilder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ The generator also supports all the :ref:`connection flags
necessary when using a project or environment variables to configure a
connection.

.. note::

Generators work by connecting to the database to get information about the current state of the schema. Make sure you run the generators again any time the schema changes so that the generated code is in-sync with the current state of the schema.

.. _edgedb-js-execution:

Expressions
Expand Down

0 comments on commit 2a9bec4

Please sign in to comment.