Example use of the FeathersJS fgraphql hook.
This app shows the use of the fgraphql hook from @feathers-plus/feathers-hooks-common.
This app was generated using @feathers-plus/cli (a.k.a. cli+).
-
Clone the repo to your machine.
-
Install your dependencies
cd path/to/hooks-graphql-example npm install
-
Start your app
npm start
-
The console will display populated data from the users service.
npm install -g @feathers-plus/cli # Install cli+
feathers-plus generate fakes # Generate new fake data with cli+
npm start # Start the server.
npm run start:seed # Start the server and reseed the database with the fake data.
src/services/users/users.populate.js # Configure the fgraphql hook for the users service.
src/services/users/users.hooks.js # Attach the fgraphql hook to the users service.
src/index.js # Run users.find() on startup.
src/services/graphql/graphql.schemas.js # The generated schema
src/services/graphql/service.resolvers.js # The generated resolver functions
Feathers-plus has a powerful command line interface. Here are a few things it can do:
$ npm install -g @feathers-plus/cli # Install cli+
$ feathers-plus generate options # Specify options for this app
$ feathers-plus generate app # Generate scaffolding for app
$ feathers-plus generate authentication # Generate authentication and user-entity service
$ feathers-plus generate secret # Generate a new secret for authentication
$ feathers-plus generate service # Generate a new service with its model
$ feathers-plus generate hook # Generate a hook
$ feathers-plus generate graphql # Generate a GraphQL endpoint for the services
$ feathers-plus generate fakes # Generate fake data
$ feathers-plus generate test # Generate a test
$ feathers-plus generate all # Regenerate the entire app
For more information on all the things you can do, visit the generator, FeathersJS and extensions.
Copyright (c) 2018
Licensed under the MIT license.