gql-generator icon indicating copy to clipboard operation
gql-generator copied to clipboard

Possibility to add exluded fields

Open homoky opened this issue 5 years ago • 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.

homoky avatar Jun 05 '20 18:06 homoky

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

BottlecapDave avatar Jul 01 '22 09:07 BottlecapDave