isValidSlug
Overview
This query takes the required input of slug as a string and returns a message indicating whether or not the slug is valid and unique.
Special Considerations
- Slug must be unique to borderless
- Slug must be at least 3 characters and no longer than 24 characters in length, containing only letters and numbers
Inputs
isValidSlugArgs
Required Data
slug (required): string
Returns
Promise<SuccessResult>
A promise containing the following object / data:
message: string
Example
Running this query:
query {
isValidSlug(slug:"abc") {
message
}
}
Gives us:
{
"data": {
"isValidSlug": {
"message": "Valid Handle."
}
}
}
Common Errors
When running this query some of the common errors encountered include:
Invalid Handle: Handle format is incorrect (I-4306)
- Slug must be a combination of letter and numbers
Invalid Handle: Handle must be 3 or more characters (I-4307)
- Slug needs to be at least 3 characters in length
Invalid Handle: Handle must be less than 25 characters (I-4308)
- Slug needs to be at most 24 characters in length
This PayMe Handle is already taken. (I-4313)
- Slug has already been registered with borderless
Expected type String! found ___.
- Slug needs to be in quotes