Add branch and stream name validation to schema directives
See original GitHub issueSchema directives should have additional checks on the input names for branches and streams, if directives can’t be used, validation will have to happen in the resolvers. Below my suggested rules.
Branches Currently implemented in the frontend:
- min length 3 (currently a branch with no name is allowed on the server!)
- max length 25
Optional rules to make branches URL and CLI friendly:
- only lowercase, numbers and dashes
- can’t start with a dash
-
Streams Currently implemented in the frontend:
- min length 3
- max length 25
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
GraphQL validation using directives
A new option: Validation with schema directives. It's possible to add this logic directly to your SDL using a new module: ...
Read more >Add support for Apollo Federation directives #210 - GitHub
Hello! I have taken an interest in using this library in one of my projects which uses Apollo Federation as its architecture for...
Read more >Schema Directives – GraphQL Tools
This document focuses on directives that appear in GraphQL schemas (as opposed to queries) written in Schema Definition Language, or SDL for ...
Read more >W3C XML Schema Definition Language (XSD) 1.1 Part 1
This specification defines several attributes for direct use in any XML documents, as described in Schema-Related Markup in Documents Being ...
Read more >Error: Schema validation failed with the following errors: Data ...
This is not angular.json structure, you something missed while upgrading.... create new fresh project and compare angular.json file. – Aniket ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Alright, didn’t realize 25 is so little! Yes, let’s def go for something higher, 80-100 for a stream name should be enough? Also agree on letting
/
in the branch names.If would be interesting to pull all the stream names from hestia to see what the length distribution is (do people rename streams much on hestia?)
I’ll get similar info from our servers, it will be an interesting point of reference.