{"id":20664038,"url":"https://github.com/flutterando/shelf_hasura_actions","last_synced_at":"2026-01-07T09:04:35.799Z","repository":{"id":56838985,"uuid":"344570996","full_name":"Flutterando/shelf_hasura_actions","owner":"Flutterando","description":"Shelf Middleware for Hasura Action.","archived":false,"fork":false,"pushed_at":"2021-04-05T23:41:04.000Z","size":14,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-20T23:56:36.922Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/shelf_hasura_actions","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Flutterando.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-04T18:28:07.000Z","updated_at":"2021-04-05T23:41:06.000Z","dependencies_parsed_at":"2022-08-28T23:12:36.995Z","dependency_job_id":null,"html_url":"https://github.com/Flutterando/shelf_hasura_actions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flutterando%2Fshelf_hasura_actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flutterando%2Fshelf_hasura_actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flutterando%2Fshelf_hasura_actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flutterando%2Fshelf_hasura_actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flutterando","download_url":"https://codeload.github.com/Flutterando/shelf_hasura_actions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235247687,"owners_count":18959461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T19:21:48.218Z","updated_at":"2025-10-06T13:31:49.095Z","avatar_url":"https://github.com/Flutterando.png","language":"Dart","readme":"# shelf_hasura_actions\n\nShelf Middleware for Hasura Action. See [Hasura Action Doc](https://hasura.io/docs/latest/graphql/core/actions/index.html)\n\n## Usage Action\n\nA simple usage example :\n\n```dart\nimport 'package:shelf_hasura_actions/shelf_hasura_actions.dart';\nimport 'package:shelf/shelf_io.dart' as io;\nimport 'calculate_usebmi_function.dart' as bmi;\n\nvoid main() async {\n  //get handler\n  final hasuraHandler = hasuraActions(_actions);\n\n  // just put in shelf pipeline\n  var server = await io.serve(hasuraHandler, 'localhost', 8080);\n  print('Serving at http://${server.address.host}:${server.port}');\n}\n\n\n//my actions list\nconst _actions = \u003cString, BindCallbackAction\u003e{\n  'bmiAction': bmi.calculateUseBmi,\n};\n```\n\n## Action Function example:\n\n```dart\nimport 'package:shelf_hasura_actions/src/hasura_request.dart';\nimport 'package:shelf/shelf.dart';\n\nFuture\u003cResponse\u003e calculateUseBmi(ActionRequest action) async {\n  return Response.ok('result\": ok');\n}\n```\n\n## Usage Trigger\n\nA simple usage example :\n\n```dart\nimport 'package:shelf_hasura_actions/shelf_hasura_actions.dart';\nimport 'package:shelf/shelf_io.dart' as io;\nimport 'calculate_usebmi_function.dart' as bmi;\n\nvoid main() async {\n  //get handler\n  final hasuraHandler = hasuraTrigger(_actions);\n\n  // just put in shelf pipeline\n  var server = await io.serve(hasuraHandler, 'localhost', 8080);\n  print('Serving at http://${server.address.host}:${server.port}');\n}\n\n\n//my actions list\nconst _actions = \u003cString, BindCallbackTrigger\u003e{\n  'bmiAction': bmi.calculateUseBmi,\n};\n```\n\n## Trigger Function example:\n\n```dart\nimport 'package:shelf_hasura_actions/src/hasura_request.dart';\nimport 'package:shelf/shelf.dart';\n\nFuture\u003cResponse\u003e calculateUseBmi(TriggerRequest action) async {\n  return Response.ok('result\": ok');\n}\n```\n\n\n\n\n## Features and bugs\n\nPlease file feature requests and bugs at the [issue tracker][tracker].\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutterando%2Fshelf_hasura_actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflutterando%2Fshelf_hasura_actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutterando%2Fshelf_hasura_actions/lists"}