You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is no mechanism to ignore Django's system tables if one does not want to allow GraphQL clients to access them. However, it is easy to add such a mechanism in ad-hoc way:
When creating const tables in src/builders/schema.js, replace
const tables = rows.map(({
name
}) => name);
by
const tables = rows.map(({
name
}) => name).filter((name) => !filter_django_tables.test(name));
where filter_django_tables is defined as:
const filter_django_tables = new RegExp('^(auth|django)_');
Django's table names are conventionally built as appname_tablename where appname is the name of a Django application (a Django based backend consists of multiple applications). ManyToMany fields are implemented using intermediary join tables and the rules for building their names can be complicated due to table name length limitations by some database backends.
However, it is possible to assign custom names to tables if one has control over the Django project's software and database.
The text was updated successfully, but these errors were encountered:
When creating
const tables
insrc/builders/schema.js
, replaceby
where
filter_django_tables
is defined as:appname_tablename
whereappname
is the name of a Django application (a Django based backend consists of multiple applications). ManyToMany fields are implemented using intermediary join tables and the rules for building their names can be complicated due to table name length limitations by some database backends.However, it is possible to assign custom names to tables if one has control over the Django project's software and database.
The text was updated successfully, but these errors were encountered: