Skip to content

How to fake simple number with a static prefix? #157

@dguay

Description

@dguay

What would be the best way to generate random number but with a certain prefix?

Example: I want to generate id with "P" prefix like "P123", "P4123", etc...

Is there a clever way to do this?

I'd think something could have worked:

id:String! @fake(type: number, options: {prefix: "P"})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions