Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI for managing GraphQL query variables #3

Open
hatertron3000 opened this issue Mar 13, 2021 · 0 comments
Open

CLI for managing GraphQL query variables #3

hatertron3000 opened this issue Mar 13, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@hatertron3000
Copy link
Owner

Create a CLI for adding, configuring, and removing GraphQL query variables. Adding a variable must:

  • prompt the user to select an existing setting in schema.json to populate the variable
  • declare the variable in the query in ./storefront_api_query.graphql
  • create or update a hidden schema type in schema.json with a graphQueries setting. Example:
  {
    "type": "hidden",
    "settings": [
      {
        "type": "graphQl",
        "id": "graphQueries",
        "typeMeta": {
          "mappings": {
            "productId": {
              "reads": "productId",
              "type": "Int!"
            }
          }
        }
      }
    ]
  }
  • create or update the mappings in the graphQueries setting's typeMeta
@hatertron3000 hatertron3000 added the enhancement New feature or request label Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant