Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
app
bin
config
db
log
public
vendor
.gitignore
.ruby-version
Gemfile
README.md
Rakefile
config.ru

README.md

SearchObject::Plugin::Graphql Example Rails Application

This is example application showing, one of the possible usages of SearchObject::Plugin::Graphql.

Interesting Files:

Installation

gem install bundler
bundle install
rake db:create
rake db:migrate
rake db:seed

rails server

From there just visit: localhost:3000/. This would open graphiql.

Sample GraphQL Queries

{
  categories {
    edges {
      node {
        id
        name
        posts(published: false) {
          edges {
            node {
              id
              title
            }
          }
        }
      }
    }
  }
}
{
  posts(first: 10, published: true, order: VIEWS) {
    edges {
      node {
        title
        isPublished
        viewsCount
        publishedAt
      }
    }
  }
}
{
  posts(first: 10, title: "Example", order: VIEWS) {
    edges {
      node {
        title
        category {
          id
          name
        }
        isPublished
        viewsCount
        publishedAt
      }
    }
  }
}