timqian/gql-generator

Possibility to add exluded fields

homoky opened this issue · 1 comments

Hey,

it would be great if it would be possible to exclude some fields. For example ID or date fields that make conflicts with snapshots.

Now I solve it with bash script:

find ./tests/ -name *.gql -type f -exec sed -i '' -e "s/  updatedAt//" {} \;
find ./tests/ -name *.gql -type f -exec sed -i '' -e "s/  createdAt//" {} \;

It goes to every gql file and remove createdAt and updatedAt fields. The space before those two is because we do not want to strip out the arguments with the same name.

I would also find this useful, even more if it supported excluding fields which were more complex (e.g. an object)