Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danstarns/neo4j-graphql-go
Exploratory Neo4j GraphQL Golang Implementation
https://github.com/danstarns/neo4j-graphql-go
graphql neo4j
Last synced: 6 days ago
JSON representation
Exploratory Neo4j GraphQL Golang Implementation
- Host: GitHub
- URL: https://github.com/danstarns/neo4j-graphql-go
- Owner: danstarns
- License: mit
- Created: 2021-03-27T18:01:32.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-04-10T13:20:39.000Z (over 3 years ago)
- Last Synced: 2023-03-03T13:18:11.719Z (almost 2 years ago)
- Topics: graphql, neo4j
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# neo4j-graphql-go
Exploratory Neo4j GraphQL Golang Implementation
## TODO
Highly Experimental as it stands can only do the schema generation and matching of a node and its properties.
- [ ] `@relationship`
- [ ] `@cypher`
- [ ] `where`
- [ ] `CREATE`
- [ ] `UPDATE`
- [ ] `DELETE`
- [ ] Serialization & De-Serialization of params
- [ ] Tests (TCK, unit, int)
- [ ] Other Types and directives IE (DateTime `@id` ...)## Installation
```
$ go get \
github.com/neo4j/neo4j-go-driver/v4/neo4j \
github.com/danstarns/neo4j-graphql-go \
github.com/graphql-go/handler
```## Quick Start
```go
package mainimport (
"fmt"
"net/http"neo4jGraphQL "github.com/danstarns/neo4j-graphql-go"
neo4jGraphQLTypes "github.com/danstarns/neo4j-graphql-go/types"
"github.com/graphql-go/handler""github.com/neo4j/neo4j-go-driver/v4/neo4j"
)func main() {
driver, _ := neo4j.NewDriver(
"bolt://localhost:7687",
neo4j.BasicAuth("admin", "password", ""),
)typeDefs := `
type Movie {
id: ID
title: String
imdbRating: Int
}
`neoSchema := neo4jGraphQL.NewSchema(
neo4jGraphQLTypes.Constructor{
TypeDefs: typeDefs,
Driver: driver,
},
)handler := handler.New(&handler.Config{
Schema: &neoSchema.Schema,
Pretty: true,
GraphiQL: true,
})http.Handle("/graphql", handler)
http.ListenAndServe(":8080", nil)fmt.Println("http://localhost:8080")
}```