GithubHelp home page GithubHelp logo

Comments (11)

magic-77 avatar magic-77 commented on May 23, 2024 1

@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.

magic-77 avatar magic-77 commented on May 23, 2024 1

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.

sutkovoy avatar sutkovoy commented on May 23, 2024 1

Thanks for example

from storefront-api-examples.

magic-77 avatar magic-77 commented on May 23, 2024

@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.

JsssCode avatar JsssCode commented on May 23, 2024

@magic-77 Great that it helps you. No, I didn't work on this

from storefront-api-examples.

magic-77 avatar magic-77 commented on May 23, 2024

@JsssCode Hi, i refactored my app, now using Storefront API + Admin API. This works much better

from storefront-api-examples.

ribalnasr avatar ribalnasr commented on May 23, 2024

@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.

ribalnasr avatar ribalnasr commented on May 23, 2024

@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.

swalkinshaw avatar swalkinshaw commented on May 23, 2024

Closing since the Angular example has been merged.

from storefront-api-examples.

Dharma-DX avatar Dharma-DX commented on May 23, 2024

@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.

JsssCode avatar JsssCode commented on May 23, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.