{"id":19111172,"url":"https://github.com/wdrdres3qew5ts21/stepzen-graphql-learning","last_synced_at":"2026-04-18T05:34:01.884Z","repository":{"id":192729267,"uuid":"687286153","full_name":"wdrdres3qew5ts21/stepzen-graphql-learning","owner":"wdrdres3qew5ts21","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-08T11:54:14.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-22T11:25:57.355Z","etag":null,"topics":["graphql","stepzen"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wdrdres3qew5ts21.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-05T03:35:55.000Z","updated_at":"2023-09-08T04:08:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"4b66bb13-c788-42dc-8646-f8f5d9a6045f","html_url":"https://github.com/wdrdres3qew5ts21/stepzen-graphql-learning","commit_stats":null,"previous_names":["wdrdres3qew5ts21/stepzen-graphql-learning"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wdrdres3qew5ts21/stepzen-graphql-learning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdrdres3qew5ts21%2Fstepzen-graphql-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdrdres3qew5ts21%2Fstepzen-graphql-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdrdres3qew5ts21%2Fstepzen-graphql-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdrdres3qew5ts21%2Fstepzen-graphql-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wdrdres3qew5ts21","download_url":"https://codeload.github.com/wdrdres3qew5ts21/stepzen-graphql-learning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdrdres3qew5ts21%2Fstepzen-graphql-learning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31957646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["graphql","stepzen"],"created_at":"2024-11-09T04:27:32.541Z","updated_at":"2026-04-18T05:34:01.855Z","avatar_url":"https://github.com/wdrdres3qew5ts21.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### JSON Convert to SDL GraphQL Structure\nhttps://transform.tools/json-to-graphql\n\n\n### ตัวอย่าง REST API ใช้ Orchestrate\nhttps://dummy.restapiexample.com/\n\nระบบ E-Commence สินค้า\nhttps://fakestoreapi.com/docs\n\nระบบ Social Feed\nhttps://jsonplaceholder.typicode.com/guide/\n\n### คำสั่งในการ Import REST API ให้เป็น Structure GraphQL\n\nstepzen import curl https://dummy.restapiexample.com/api/v1/employees --name employees --query-type Employees --query-name employees --path-params '/employees'\n\n\nstepzen import curl https://dummy.restapiexample.com/api/v1/employee/1 --name employees --query-type Employees --query-name employees \n\nstepzen import curl https://fakestoreapi.com/products --name employees --query-type Products --query-name products \n\nstepzen import curl https://fakestoreapi.com/products --name employees --query-type Products --query-name products \n\nstepzen import curl https://fakestoreapi.com/products/categories --name employees --query-type Categories --query-name categories \n\nstepzen import curl https://fakestoreapi.com/carts --name employees --query-type Carts --query-name carts \n\n\nstepzen deploy\n\n\n1. create the graphql schema using `stepzen import curl`. \n   ```\n   stepzen import curl https://customerapi-zo6fgz3fza-uc.a.run.app/customers/4 --name customers --query-type Customer --query-name customer --path-params '/customers/$id'\n   ```\n   It can be helpful to explain the extra command line flags that are used to alter the generated schema. For full descriptions see [StepZen Import Command](https://stepzen.com/docs/cli/cli-commands#stepzen-import).   \n   `-name` specifies that the generated schema will be written to the `customers` subdirectory.\u003cbr\u003e\n   `-query-type` specifies that the type returned by the endpoint will be named `Customers`.\u003cbr\u003e\n   `--query-name` specifies that the field `customer` will be added to `type Query` to accesses the imported curl endpoint.\u003cbr\u003e\n   `--path-params` specifies that `/customers/$id` is the path parameter in the URL path. \n\n\nsupakorn.t@Supakorns-MacBook-Pro stepzen-kbank % stepzen deploy\nDeploying api/melting-gorilla to StepZen... done in 3.1s 🚀\n  ✓ 🔐 https://sangregoriodenigua.stepzen.net/api/melting-gorilla/__graphql\n  ✓ 🔐 wss://sangregoriodenigua.stepzen.net/stepzen-subscriptions/api/melting-gorilla/__graphql (subscriptions)\n\nYou can test your hosted API with curl:\n\ncurl https://sangregoriodenigua.stepzen.net/api/melting-gorilla/__graphql \\\n   --header \"Authorization: Apikey $(stepzen whoami --apikey)\" \\\n   --header \"Content-Type: application/json\" \\\n   --data-raw '{\n     \"query\": \"query SampleQuery { __schema { description queryType { fields {name} } } }\"\n   }'\n\nOr explore it with GraphiQL at\n   https://dashboard.stepzen.com/explorer?endpoint=api%2Fmelting-gorilla\n\n   The StepZen Dashboard at dashboard.stepzen.com is the new default way to\n   explore your GraphQL APIs. You can use the --dashboard=local flag to start\n   a locally running GraphiQL instead.\n\nStepzen logic\nhttps://github.com/stepzen-dev/examples/blob/main/with-rest/stepzen/rest.graphql\n\n\nStepzen GraphQL API\n\nquery categoriesAll {\n  carts {\n    date\n    id\n    products {\n      id\n      productId\n      quantity\n    }\n  }\n  productsAll {\n    image\n    id\n    title\n  }\n}\n\nGraphQL Directive\nhttps://graphql.org/learn/queries/#directives\n\nSOAP Endpoint Demo Online\nhttps://www.crcind.com/csp/samples/SOAP.Demo.cls\n\nquery watchDetailAll {\n  carts {\n    products {\n      productDetail {\n        price\n      }\n      quantity\n    }\n  }\n}\n\n\nstepzen import mysql\n\n```sql\nSELECT e.emp_no ,e.first_name ,e.last_name, dept_name  from employees e  \njoin dept_emp deemp ON deemp.emp_no = e.emp_no JOIN  departments de on de.dept_no = deemp.dept_no  ;\n```\n### Sakila DB สำหรับ MySQL 8\nhttps://github.com/sakiladb/mysql\n\nตัวอย่่าง Syntax Query Sakila\n\n```sql\nSELECT * FROM actor a ;\nSELECT * FROM film f ;\nSELECT * FROM film_actor fa ;\n```\n\n\n#### เชื่อมต่อ Application NodeJS เข้ากับ GraphQL Endpoint\nสามารถทำได้กันสองแบบคือการเรียกผ่าน CURL HTTP Endpoint เข้าไปโดยตรงหรือจะผ่าน Library ที่มีการจั\nhttps://stepzen.com/docs/connecting-frontends/connecting-via-nodejs\n\n```\nyarn add graphql-request\n```\n\n### GraphQL สามารถใช้ Socket  Subscription ได้ผ่าน Socket\nhttps://the-guild.dev/graphql/ws/get-started\nซึ่งสามารถเรียกใช้ Parameter Filter ได้เหมือนกัน\nแล้วค่าที่เปลีย่นไปก็จะอัพเดทตามทุกๆสิบวินาที\n\n```\nyarn add graphql-ws\nyarn add ws\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdrdres3qew5ts21%2Fstepzen-graphql-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwdrdres3qew5ts21%2Fstepzen-graphql-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdrdres3qew5ts21%2Fstepzen-graphql-learning/lists"}