Comments (11)
@ribalnasr You can fetch it this way:
graphql-js-schema-fetch --url 'https://apikey:password@<your-shop-name>.myshopify.com/admin/api/graphql.json' | jq '.' > schema.json
To get the right URL for https://apikey:password@, login to Admin and copy it from the Field "Example url"
from storefront-api-examples.
You have to convert json schema to types like this
graphql-js-schema --schema-file schema.json --outdir ./src --schema-bundle-name 'Types' --bundle-only
from storefront-api-examples.
Thanks for example
from storefront-api-examples.
@JsssCode Hi, thanks for this example App. It is useful for me, because i'm developing an Shopify App using Ionic 3.
Do you know how to implement a Customer Login Page?
Right now, i am using the Shopify Buy SDK.
from storefront-api-examples.
@magic-77 Great that it helps you. No, I didn't work on this
from storefront-api-examples.
@JsssCode Hi, i refactored my app, now using Storefront API + Admin API. This works much better
from storefront-api-examples.
@magic-77 can you please show how you got the admin api to work. for now i'm struggling with types.ts, how can i generate that file for the admin graphql client?
from storefront-api-examples.
@magic-77 can you stay with me on this one please, am extremely new to graphql.
this line does not work:
$ graphql-js-schema-fetch --url 'https://apikey:password@<your-shop-name>.myshopify.com/admin/api/graphql.json' | jq '.' > schema.json
Error: Cannot find module 'commander'
when i try to run it without | jq '.'
it works and creates the file schema.json.
however i believe what am looking for is a .ts file like this one
https://github.com/JsssCode/SmallAwesomeShop/blob/master/src/app/shared/services/types.ts
correct?
from storefront-api-examples.
Closing since the Angular example has been merged.
from storefront-api-examples.
@JsssCode your angular 4 code is helpfull for me ,
i stucked in CORS issue for Shopify REST API Post Method for add Product. now to try to use proxy ,if any one faced the same issue please help me.
Thanks.
from storefront-api-examples.
@Dharma-DX I didn't face CORS problem for Shopify, but you could try to run Chrome without CORS, like described here https://alfilatov.com/posts/run-chrome-without-cors/
from storefront-api-examples.
Related Issues (20)
- How can we modify checkout weburl
- Query Products within collectionByHandle HOT 1
- React-graphql-client HOT 1
- Modifying Shipping Options (Rates, Description, etc)?
- react-js-buy example: checkout.totalTax and checkout.totalPrice do not exist on type 'Cart' HOT 1
- Unable to query checkout after it's created HOT 1
- Angular 9
- Customer Mutate storefront API limitations
- variantBySelectedOptions field doesn't exist on Product HOT 2
- How to Associate Checkout when click login? HOT 20
- Shopify Storefront API returning an empty products array HOT 2
- Is it secure to store API keys on the customer with unauthenticated_read_customers?
- Unable to Generate Storefront Token HOT 1
- How to get CustomerRecover to work? Getting undefined
- CustomerRecover not returning token it returns only userErrors HOT 1
- how to check valid or expired generated token by customerRecover before customerReset HOT 1
- Payment status callback
- How to clear localstorage/cookies (cart/checkout) on custom front-end?
- shopify returning an error indicated that the cart does not exist however fetching the same cart is successful
- Wrong response body when adding cart item to cart
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storefront-api-examples.