{"id":16227427,"url":"https://github.com/simonaco/serverless-graphql-apis-part2","last_synced_at":"2025-04-08T04:27:41.628Z","repository":{"id":145737164,"uuid":"170305202","full_name":"simonaco/serverless-graphql-apis-part2","owner":"simonaco","description":null,"archived":false,"fork":false,"pushed_at":"2019-02-12T11:28:19.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T16:06:38.764Z","etag":null,"topics":["graphiql-interface","graphql"],"latest_commit_sha":null,"homepage":"https://graphqlplayground.azurewebsites.net/api/graphiql","language":"HTML","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/simonaco.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":"2019-02-12T11:17:40.000Z","updated_at":"2019-02-28T15:50:12.000Z","dependencies_parsed_at":"2023-04-12T20:30:30.365Z","dependency_job_id":null,"html_url":"https://github.com/simonaco/serverless-graphql-apis-part2","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/simonaco%2Fserverless-graphql-apis-part2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonaco%2Fserverless-graphql-apis-part2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonaco%2Fserverless-graphql-apis-part2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonaco%2Fserverless-graphql-apis-part2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonaco","download_url":"https://codeload.github.com/simonaco/serverless-graphql-apis-part2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247777101,"owners_count":20994225,"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":["graphiql-interface","graphql"],"created_at":"2024-10-10T12:52:43.805Z","updated_at":"2025-04-08T04:27:41.607Z","avatar_url":"https://github.com/simonaco.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphiQL is an in-browser IDE for exploring GraphQL\n\n## Steps:\n\n1. Replace the URL in graphQLFetcher function with your own GraphQL endpoint URL [https://\u003cyour_function_url\u003e/api/graphql](https://\u003cyour_function_url\u003e/api/graphql)\n\n1. In the [Azure Portal](https://aka.ms/portal-nceu18) navigate to functions, click on the graphql function. From there, click on the *Platform features* tab -\u003e API -\u003e CORS and add your url as allowed origin\n\n1. Run locally - use a local http server (i.e. http-server). If you don't have one installed:\n\n```\nnpm i -g http-server\n```\n\n1. If you want to connect to your function running locally, go to your function's local.settings.json file and change it to include CORS settings:\n\n```json\n    {\n        \"IsEncrypted\": false,\n        \"Values\": {\n            \"AzureWebJobsStorage\": \"\",\n            \"FUNCTIONS_WORKER_RUNTIME\": \"node\",\n        },\n        \"Host\": {\n            \"CORS\":\"*\"\n        }\n    }\n```\n\n### Extra steps\n\n1. Deploy this as a static website in the cloud. You can use Azure Blob Storage following [steps here](https://aka.ms/static-nceu18)\n\n1. In your function app configure proxies to redirect traffic to your GraphiQL app\n\n```json\n{\n  \"$schema\": \"http://json.schemastore.org/proxies\",\n  \"proxies\": {\n    \"graphiql\": {\n      \"matchCondition\": {\n        \"methods\": [\"GET\"],\n        \"route\": \"/api/graphiql\"\n      },\n      \"backendUri\": \"your_url_here\"\n    }\n  }\n}\n```\n\n1. Deploy your GraphQL api function app with the new proxy configured\n\n1. Test GraphiQL by navigating to your function [https://\u003cyour_function_url\u003e/api/graphiql](https://\u003cyour_function_url\u003e/api/graphiql)\n\n---\n\n⚡ Congrats!! You have now completed all steps!! ⚡\n\n### More resouces\n\n1. To learn more about GraphiQL go to [GraphiQL](https://github.com/graphql/graphiql)\n\n1. To learn more about proxies go to [Azure Proxies](https://aka.ms/proxies-nceu18)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonaco%2Fserverless-graphql-apis-part2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonaco%2Fserverless-graphql-apis-part2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonaco%2Fserverless-graphql-apis-part2/lists"}