{"id":18584049,"url":"https://github.com/brob/hygraph-app-datapicker-poc","last_synced_at":"2025-08-02T03:40:22.348Z","repository":{"id":206253373,"uuid":"716178996","full_name":"brob/hygraph-app-datapicker-poc","owner":"brob","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-07T19:20:58.000Z","size":264,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-07T22:38:14.235Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brob.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11-08T15:47:10.000Z","updated_at":"2024-08-07T19:21:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"5882dab1-99c2-4335-a116-5b2592dd2945","html_url":"https://github.com/brob/hygraph-app-datapicker-poc","commit_stats":null,"previous_names":["brob/hygraph-app-datapicker-poc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brob%2Fhygraph-app-datapicker-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brob%2Fhygraph-app-datapicker-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brob%2Fhygraph-app-datapicker-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brob%2Fhygraph-app-datapicker-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brob","download_url":"https://codeload.github.com/brob/hygraph-app-datapicker-poc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223435918,"owners_count":17144643,"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-07T00:25:57.810Z","updated_at":"2024-11-07T00:25:58.313Z","avatar_url":"https://github.com/brob.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hygraph Top-Level Remote Source Data Picker App\n\n\u003e **Warning** this is an early-stage proof of concept. Currently best situated as educational code for deeper integrations. Proceed with some amount of caution, but also, PRs are welcome!\n\nThis is a proof of concept for a Hygraph App to allow users to choose data from a remote source. It requires that [top level remote sources](https://hygraph.com/docs/getting-started/top-level-remote-fields) be used.\n\n## Making your own\n\nWe have a hosted version of this app available, but it might be best to host it yourself for any minor changes you wish to make. To do so, follow these steps:\n\n### 1. Clone the project and install the dependencies\n\n```\nnpx degit git@github.com:brob/hygraph-app-datapicker-poc.git data-picker\ncd data-picker\nnpm install\nnpm run dev\n```\n\n### 2. Register your app on Hygraph\n\u003e In order to use your own version, you need a Hygraph account and a project to install the app to.\n\nFollow [these instructions](https://hygraph.com/docs/app-framework/first-steps/register-your-app) to register an app on Hygraph.\n\nIf you're working locally, your app's URL will be `http://localhost:3000`. If you're hosting your app on a server, you'll need to use the URL of your server. The \"Setup\" route will be `http://localhost:3000/setup` or `http://your-server.com/setup`.\n\n\n\n### 3. Create the two Elements required by the app\n\nThere are two elements that you can use in this App. Both are Field elements. Here's the data needed for both:\n\n**GraphQL Data Picker Element**\n* Name: GraphQL Data Picker\n* API ID: `graphqlDataPicker`\n* Type: Field\n* Features: FieldRenderer\n* Field Type: String\n* URL: `http://localhost:3000/dataPicker`\n* Description: A data picker for GraphQL data sources (or what makes sense for you)\n* Config: \n```\n{\n  \"ID_FIELD\": {\n    \"type\": \"string\",\n    \"description\": \"The key to the ID field\",\n    \"displayName\": \"ID Field ID\"\n  },\n  \"QUERY_ID\": {\n    \"type\": \"string\",\n    \"description\": \"Remote Source Field API ID\",\n    \"displayName\": \"API ID\"\n  },\n  \"TITLE_FIELD\": {\n    \"type\": \"string\",\n    \"description\": \"The key to the title field\",\n    \"displayName\": \"Title Field ID\"\n  }\n}\n```\n\n**REST Data Picker Element**\n* Name: REST Data Picker\n* API ID: `restDataPicker`\n* Type: Field\n* Features: FieldRenderer\n* Field Type: String\n* URL: `http://localhost:3000/restData`\n* Description: A data picker for REST data sources (or what makes sense for you)\n* Config: \n```\n{\n  \"ID_FIELD\": {\n    \"type\": \"string\",\n    \"description\": \"The key to the ID field\",\n    \"displayName\": \"ID Field ID\"\n  },\n  \"QUERY_ID\": {\n    \"type\": \"string\",\n    \"description\": \"Remote Source Field API ID\",\n    \"displayName\": \"API ID\"\n  },\n  \"TITLE_FIELD\": {\n    \"type\": \"string\",\n    \"description\": \"The key to the title field\",\n    \"displayName\": \"Title Field ID\"\n  },\n  \"DATA_KEY\": {\n    \"type\": \"string\",\n    \"description\": \"The key to the data array that comes back from the API\",\n    \"displayName\": \"Data Array Key\"\n  }\n}\n```\n\n### 4. Install the App in your project\n\nIn your project, navigate the the Apps screen. Click \"Go to your apps,\" Click the install icon on your app.\n\n### 5. Add the fields in your schema\n\nAdd the fields in the configurations that make sense for your APIs in whatever schema you want your editors to have access to a picker.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrob%2Fhygraph-app-datapicker-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrob%2Fhygraph-app-datapicker-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrob%2Fhygraph-app-datapicker-poc/lists"}