Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some configurations are not reflected in the drivers.js #64

Open
epii-1 opened this issue Jun 9, 2020 · 4 comments · May be fixed by #110
Open

Some configurations are not reflected in the drivers.js #64

epii-1 opened this issue Jun 9, 2020 · 4 comments · May be fixed by #110
Labels
backlog Keep open for later (typically, not a problem for SPIRIT but maybe for other woo.sh projects)

Comments

@epii-1
Copy link
Collaborator

epii-1 commented Jun 9, 2020

Some configurations are not only applicable for the generation of api-schema, resolvers and which driver to select etc.. Some are also relevant when actually running the driver (as they are setup now).
Currently field_for_creation_date and field_for_last_update_date are both expected to always be set to true in the driver, and actually setting them to false would lead to errors when creating objects etc., as the driver would try to insert fields that does not exists.

How to solve this might not be obvious. My suggestions would be to either keep keep the relevant configurations as actually values in the drivers file(s), or have lines in the driver(s) files that are added/removed dynamically during generations depending on the configurations.

I should have realized this earlier....

@hartig @keski @rcapshaw

@hartig
Copy link
Member

hartig commented Jun 11, 2020

@keski do you have an opinion of what might be a good way to address this?

@hartig
Copy link
Member

hartig commented Jul 20, 2020

Let's leave this issue open for the time being. It's not an actual problem for SPIRIT, but it may become an issue for other projects that use woo.sh and don't want the automatically maintained creationDate and lastUpdateDate fields.

@hartig hartig added the backlog Keep open for later (typically, not a problem for SPIRIT but maybe for other woo.sh projects) label Aug 17, 2020
@epii-1 epii-1 linked a pull request Aug 31, 2020 that will close this issue
@keski
Copy link
Collaborator

keski commented Sep 10, 2020

I believe that currently field_for_creation_date and field_for_last_update_date are the only things really affected in the driver, since all other features simply unavailable in the generated API schema. This means we don't have to remove large chunks from the driver or rearrange the code, but simply toggle the inclusion of the date fields.

@hartig
Copy link
Member

hartig commented Sep 10, 2020

Okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Keep open for later (typically, not a problem for SPIRIT but maybe for other woo.sh projects)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants