question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add branch and stream name validation to schema directives

See original GitHub issue

Schema 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:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
teocomicommented, Oct 8, 2020

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.

1reaction
daviddekoningcommented, Oct 8, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found