I got started with making Shopify app.
However, I'm confused in the midway.
I'm using GraphQL and understood the queries. But not sure how to make an input field for app users to put a value that will be dynamically displayed in shop. Trying to figure it out with GraphQL mutation but not sure if it's the right direction.
Imagine you'd have to build a discount app where users can put a specific amount of discount in bulk that will be visible in store. What links/tutorials should I be checking?
Solved! Go to the solution
This is an accepted solution.
Hi Mate
Are you using react?
Usually you put in a text box. Which populates a variable
In react you would populate the state.
States in react automatically refresh the page when the value is changed with setState()
Then you assign that variable to your query parameter in your GQL query or mutations.
Nice, I would get started just familiarizing yourself with React.
have a read of this to get you up to speed.
https://reactjs.org/tutorial/tutorial.html
then take a swing at the shopify tutorial
https://shopify.dev/tutorials/build-a-shopify-app-with-node-and-react
if you're on Mac/Linux you can run this
https://github.com/Shopify/shopify-app-cli
it's a great CLI that shopify has. there is a command 'create' that will create a starting point for you.
really speeds up the process.
User | Count |
---|---|
15 | |
11 | |
10 | |
7 | |
5 |