-
Notifications
You must be signed in to change notification settings - Fork 23
Guide: Create a new content type
Mario Vercellotti edited this page May 2, 2024
·
4 revisions
- Create a new content type, add the fields. In this case we have called the content type "Test content" and we will have the body field, and a textfield called Testfield:
- In order to use the preview functionality, you have to add it to the next-drupal setup:
- go to https://next-drupal-starterkit.lndo.site/en/admin/config/services/next/entity-types
- add a new entity, select your content type
- configure it like this:
3. configure the graphql_compose schema for the new content type, configure as follows: (note that we are enabling all checkboxes)
- Create a node of your new content type:
We cannot commit the configuration changes here, but I have included the database used in my tests: db_with_content_type.gz
-
run
lando npm run grapqhl-codegen
to update the type definitions, now that we have a new content type. -
apply the code changes in this PR, I will add comments on the code.