graphql-codegen-typescript-mock-data
graphql-codegen-typescript-mock-data copied to clipboard
Create a value based on the key name
Hi got a question. Is it possible or maybe a future feature to add GeneratorOptions based on the key name? for example if I have an type type User { userId: String! }
when the mock will be generated for the User, userId will be mapped to a random string. Is it possible to check if the key has a certain regex inside of it and generate a faker based response? I understand that userId should be defined as an ID and that can solve my problems, buy maybe thats a useful feature anyway.