Code Monkey home page Code Monkey logo

AutoGraphQL

Automatically provide CRUD functions for GraphQL and code free.
It supplies some automatic Schemas, Types and resolvers so that you don't need to write them.

image

0F85206E116CCEE74DB68E5B9A3AEDAE

Song Firework-Katy Parry(Modified)

Do you ever feel like a backend slave
Repeating CRUD, wanting to make a change?
Do you ever feel, APIs' so paper thin
Like a house of cards, one blow from cavin' in?
Do you ever feel they always complain?
Urging doc and feedback bugs, even ask your refactoring
Do you know that there's still a chance for you?
'Cause there's a powerful tool
You just gotta depend and configure
And let it init
Just start APIs
They are so easy to try
'Cause baby, you're a firework
Come on, show 'em what you're worth
Make 'em go, "Oh, oh, oh"
As you give 'em an A-T-M
Baby, you're a firework
Come on, let them serve themselves
Make 'em go, "Oh, oh, oh"
You're gonna leave 'em all in awe, awe, awe.


Tired of endless arguments about HTTP API dev or use?
Use AutoGraphQL-the framework for providing infinity codeless CRUD APIs that fit almost all your needs.
Unfold the Power(In Your Soul) with ⭐Star & Clone.

Examples

1.Fetch an User

Request:

{
  fetch(arg: {
    User: {
      id: 38710
    }
  })
}

Response:

{
    "data": {
        "User": {
            "id": 38710,
            "sex": 0,
            "name": "TommyLemon",
            "tag": "Android&Java",
            "head": "http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000",
            "date": 1485948110000,
            "pictureList": [
                "http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000",
                "http://common.cnblogs.com/images/icon_weibo_24.png"
            ]
        },
        "code": 200,
        "msg": "success"
    }
}

2.Fetch a List of Users

Request:

{
  fetch(arg: {
    "[]":{
      "count":3,
      "User":{
        "@column":"id,name"
      }
    }
  })
}

Response:

{
    "data": {
        "[]": [
            {
                "User": {
                    "id": 38710,
                    "name": "TommyLemon"
                }
            },
            {
                "User": {
                    "id": 70793,
                    "name": "Strong"
                }
            },
            {
                "User": {
                    "id": 82001,
                    "name": "Android"
                }
            }
        ],
        "code": 200,
        "msg": "success"
    }
}

3.Fetch a Moment with it's publisher

Request:

{
  fetch(arg: {
    "Moment":{
    },
    "User":{
      "id@":"Moment/userId"  //User.id = Moment.userId
    }
  })
}

Response:

{
    "data": {
        "Moment": {
            "id": 12,
            "userId": 70793,
            "date": "2017-02-08 16:06:11.0",
            "content": "1111534034"
        },
        "User": {
            "id": 70793,
            "sex": 0,
            "name": "Strong",
            "tag": "djdj",
            "head": "http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000",
            "contactIdList": [
                38710,
                82002
            ],
            "date": "2017-02-01 19:21:50.0"
        },
        "code": 200,
        "msg": "success"
    }
}

4.Add a Comment

Request:

mutation {
  add(arg: {
    "Moment":{
       "userId":38710,
       "content":"APIJSON,let interfaces and documents go to hell !"
    },
    "tag":"Moment"
  })
}

Response:

{
    "data": {
        "Moment": {
            "code": 200,
            "msg": "success",
            "id": 120
        },
        "code": 200,
        "msg": "success"
    }
}

5.Edit a Moment

Request:

mutation {
  edit(arg: {
     "Moment":{
       "id":235,
       "content":"APIJSON,let interfaces and documents go to hell !"
     },
     "tag":"Moment"
  })
}

Response:

{
    "data": {
        "Moment": {
            "code": 200,
            "msg": "success",
            "id": 235
        },
        "code": 200,
        "msg": "success"
    }
}

6.Delete a Moment

Request:

mutation {
  delete(arg: {
     "Moment":{
       "id":120
     },
     "tag":"Moment"
  })
}

Response:

{
    "data": {
        "Moment": {
            "code": 200,
            "msg": "success",
            "id": 120
        },
        "code": 200,
        "msg": "success"
    }
}

Documents

https://github.com/graphql-java/graphql-java#documentation
https://github.com/APIJSON/APIJSON/blob/master/Document-English.md#2

Related

GraphAuto An advanced API management tool for GraphQL APIs with machine learning.
image

Star to support

https://github.com/AutoGraphQL/AutoGraphQL

autographql's Projects

apiauto icon apiauto

☔机器学习测试、自动生成代码、自动静态检查、自动生成文档与注释等,做最先进的接口管理工具。☔The most advanced API management tool. Testing with machine learning, generating codes, static analysising, generating documents and generating annotations.

apijson icon apijson

🚀A JSON Transmission Protocol and an ORM Library for auto providing APIs and Documents.

autographql icon autographql

Automatically provide CRUD functions for GraphQL without coding.

graphauto icon graphauto

An advanced API management tool for GraphQL APIs with machine learning.

graphiql icon graphiql

GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.

graphql icon graphql

GraphQL is a query language and execution engine tied to any backend service.

graphql-playground icon graphql-playground

🎮 GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)

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.