Example Setup
For testing the TypoGraph extension in your system without hooking up any of your actual data, you can set up some example tables and seed them with a number of related entries:
vendor/bin/typo3 typograph:example
The command accepts two parameters:
--: If you install the extension in a multisite instance, you can specify for which site the GraphQL endpoint is configures. Defaults tosite mainif omitted.--: If you only want the example schemas and tables rolled out but fill them with data yourself, you can skip the entry seeding with this parameter.no- seed
The command creates the following tables and (unless you skip the seeding part) fills them with a handful of entries:
tx_typograph_ example_ taxonomies tx_typograph_ example_ disciplines tx_typograph_ example_ experts tx_typograph_ example_ experts_ disciplines_ mm
It will also create the following schema files withing the TypoGraph package folder:
Resources\Private\ Schemas\ Example Query. graphql Resources\Private\ Schemas\ Example Types. graphql
Finally, the command also adds the necessary configuration entries in
config/.
Once the commmand has finished, you need to manually clear the TYPO3 and PHP caches via the TYPO3 Backend Maintenance Tool. This is recommended because due to your setup (e.g., if you are working with PHP-FPM), OPcache for worker threads will not be cleared unless done via the web interface (see, e.g., this discussion on TYPO3 cache flushing via the command line).
Now you can query the GraphQL endpoint available at the path /graphql for the
example data. You can also run the Codeception API tests from tests\
against the endpoint, if needed.