Giter Site home page Giter Site logo

spidey's Introduction

spidey's People

Contributors

tinrab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spidey's Issues

Graphql generated.go errors

I get a list of errors when I run docker-compose up -d --build

# github.com/tinrab/spidey/graphql/graph
graph/generated.go:843:17: cannot convert nil to type introspection.InputValue
graph/generated.go:846:54: cannot use res[idx1] (type introspection.InputValue) as type *introspection.InputValue in argument to ec.___InputValue
graph/generated.go:1003:17: cannot convert nil to type introspection.InputValue
graph/generated.go:1006:54: cannot use res[idx1] (type introspection.InputValue) as type *introspection.InputValue in argument to ec.___InputValue
graph/generated.go:1020:9: cannot convert nil to type introspection.Type
graph/generated.go:1023:30: cannot use res (type introspection.Type) as type *introspection.Type in argument to ec.___Type
graph/generated.go:1113:9: cannot convert nil to type introspection.Type
graph/generated.go:1116:30: cannot use res (type introspection.Type) as type *introspection.Type in argument to ec.___Type
graph/generated.go:1178:17: cannot convert nil to type introspection.Type
graph/generated.go:1181:48: cannot use res[idx1] (type introspection.Type) as type *introspection.Type in argument to ec.___Type
graph/generated.go:1181:48: too many errors

use bleve instead of elastic

dont knwo if your aware but there is a pure golang equivalent of elastic called bleve.
Its very easy to use.
Its data storage medium is based on pure golang too.

Now there is a GRPC wrapper too and so will fit well into the MicroServices topology

https://github.com/mosuka/blast

  • This is the GRPC wrapper which load balances too.

Pretty cool !

How to do with mongoDB

want to create repository of mongDB how to create pool connection of mongo
like sql.Open

Nested queries are not executed

Hi @tinrab ,

First at all, thanks for your articles at outcrawl.com, I am personally learning a lot from them.

However I have a couple of doubts:

  • Why do you take Order model out from the code generation tool? You mention that " more control is needed for the Order mode" but I don't understand why.
  • I am not able to retrieve any Order when querying Accounts, it always returns an empty array. I have already checked that all data from creation of Accounts, Products and Orders is in the database. Also, I have noticed that method Account_orders is never called.

I have read the docs from https://gqlgen.com/getting-started/ where the binding rules are described:

  • If there is a property with that name and type, use it
  • If there is a method with that name and type, use it
  • Otherwise, add it to the Resolvers interface. This is the magic.

So I am assuming that since model Account contains a property []Order it tries to resolve it without calling to Account_orders, resulting always in an empty array. Also I am totally confused on the example provided in gqlgen tutorial: both User and Todo are not pregenerated (but User would generate the same model, while Todo uses a String instead of an Object for property UserID), and the Todo_user method is added automatically to the Resolvers interface, something that is not happening in the Spidey example.

There is something that I'm missing...

Thanks!

Can't replicate usage

Hello!

I've tried playing around with your project, however, after following the instructions in the README file, I can't get it to run.

After running $ vgo mod -vendor, this is the output in the console: https://gist.github.com/Oxyrus/82e1111479f757d954a3e3121bfe1d07

And once I run $ docker-compose up -d --build this is the output/error:

Building account_db
Step 1/3 : FROM postgres:10.3
 ---> b5ed9a4ab65b
Step 2/3 : COPY up.sql /docker-entrypoint-initdb.d/1.sql
 ---> Using cache
 ---> ade6d4dab6a2
Step 3/3 : CMD ["postgres"]
 ---> Using cache
 ---> 18ec8160de75

Successfully built 18ec8160de75
Successfully tagged spidey_account_db:latest
Building account
Step 1/11 : FROM golang:1.10.2-alpine3.7 AS build
 ---> 44ccce322b34
Step 2/11 : RUN apk --no-cache add gcc g++ make ca-certificates
 ---> Using cache
 ---> dab491024018
Step 3/11 : WORKDIR /go/src/github.com/tinrab/spidey/account
 ---> Using cache
 ---> d8621f59b3f2
Step 4/11 : COPY vendor ../vendor
ERROR: Service 'account' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder453847030/vendor: no such file or directory

My Go version is 1.10.3, I wonder if this is related to vgo because I've never used it before. Thanks a lot for any help provided!

Unable to remove dependencies

Hi , @tinrab
I'm unable to host the project (which follow the same structure of yours project ) on jenkins (kubernetes) and also unable to remove dependencies as in API gate way (graphql ) you implemented other services also but when docker file run over jenkins it unable to import other services as these are the part of other git repos .
will you suggest how to overcome this problem.
how to make micro services without any dependencies.

go vendor is now go mod -vendor

I got this message if I do

$ vgo vendor
go vendor is now go mod -vendor

Change command to vgo mod -vendor works for me

Environment

$ vgo version
go version go1.10.3 darwin/amd64 vgo:2018-02-20.1

Can't established connection with elasticsearch

Hi, first thanks for the example! It helps me learn.

But I found a problem while replicating your article on Medium. I can execute accountCreate but I couldn't execute productCreate, and when I checked, it has a message error like the below on the catalog container:

missing "=" after "http://catalog_db:9200" in connection info string

docker-compose successfully up and running.

Any idea what happens?

Project Layout (Multilanguage development)

Thank you a for this great project and tutorial. I've really enjoyed it while following.

I'm trying to build a boilerplate for microservices development. And I have a few questions and request about this project.

  1. I'm planning to use different languages for different services. For example typescript for graphql api, c# for auth, go for image process.

Could you add an example to use a different language for a service?

  1. go.mod and go.sum files in the root of project. Is it better idea to put them inside the services so they will be loose coupled.

  2. For database, Is there any persistent layer to keep the data while relaseing application?

Subscriptions

This is a really nice example.

I would like to try and extend it and make a few PR's and am curious about a few things

Subscriptions ? This is still evolving with graphql but I think it would be very useful to add this.

Codegen of db.
The new gnorm project looks pretty nice. It's a db first approach which might seem weird considering graphql is top down approach but I like aging the flexibility in the middle of you know what I mean.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.