Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/graphql-editor/.graph
World is moving towards graph sourced systems. This is a .graph format for storing data structure without types.
https://github.com/graphql-editor/.graph
dataformat file format graph json not
Last synced: about 2 months ago
JSON representation
World is moving towards graph sourced systems. This is a .graph format for storing data structure without types.
- Host: GitHub
- URL: https://github.com/graphql-editor/.graph
- Owner: graphql-editor
- Created: 2019-06-13T08:07:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-13T08:08:03.000Z (over 5 years ago)
- Last Synced: 2024-06-21T11:29:22.380Z (3 months ago)
- Topics: dataformat, file, format, graph, json, not
- Size: 1000 Bytes
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-starred - graphql-editor/.graph - World is moving towards graph sourced systems. This is a .graph format for storing data structure without types. (json)
README
# .graph
:smile: Let's welcome new serialisation format. The only role of the format is to hold the structure without data and types.
If you think graph, there are no arrays there there are only nodes and connections.
Deserialisation is up to you also
## Why?
World is moving towards graph sourced systems.
## Example
So assume we have a file `DatabaseStructure.graph` with the following contnent:
Structure
```
Person {
animals
friends
gender
age
}
```That's `34` bytes
### Deserialization
So this graph code could be deserialized as using pseudocode
```
code = Graph.parse("JackSparrow.graph")
``````json
{
"Person":{
"animals":{},
"friends":{},
"gender":{},
"age":{}
}
}
```
To define the same structure in json it takes `59` bytes. Of course you can deserialise it in other way this is just an example.As we can see the size of that .graph file differs from .json file and its only 67% of size
### Real world usage - Tests
```
Webpage{
Pages{
Home{
menuButton
heading1
heading2
testimonials{
Jerry
John
Patricia
}
}
About{
menuButton
Team{
Jennifer
Eve
Tom
Robert
}
}
Contact{
menuButton
form{
message
send
}
}
}
}
```Now using some testing framework I can bind exact string values to my elements and click them without writting this creepy structure:
```json
{
"Webpage":{
"Pages":{
"Home":{
"menuButton": "menuButton",
"heading1": "heading1",
"heading2": "heading2",
"testimonials": {
"Jerry": "Jerry",
"John": "John",
"Patricia": "Patricia"
}
},
"About":{
"menuButton": "menuButton",
"Team":{
"Jennifer": "Jennifer",
"Eve": "Eve",
"Tom": "Tom",
"Robert":"Robert"
}
},
"Contact":{
"menuButton": "menuButton",
"form":{
"email": "email",
"message": "message",
"send": "send"
}
}
}
}
}
```### Real world usage UX planning
```
MainScreen{
openTutorial{
skipLesson
checkLesson
}
openProjects{
createProject{
typeName
submit
}
loadProject
deleteProject
}
openHelp{
search
sendFeedback
}
openConsole{
submitCommand
}
}
```### Real world usage UI planning
```
LoginScreen{
googleLogin
githubLogin
usernameInput
passwordInput
submit
}
TodosScreen{
todoList{
name
done
}
newTodo{
nameInput
submit
}
}
```