Open kctoft opened 1 year ago
Special note: when designing the Weather API endpoint, be sure to be in the stepzen
folder.
stepzen init
to create a new endpointstepzen import curl
the urSince I am using Nix flake
, my node_modules
folder needs to be accessed in a particular way (see example below).
PATH=$PWD/node_modules/.bin:$PATH stepzen import curl "https://api.open-meteo.com/v1/forecast?latitude=51.51&longitude=-0.13&hourly=temperature_2m,relativehumidity_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall,snow_depth,windgusts_10m,uv_index,uv_index_clear_sky&daily=weathercode,temperature_2m_max,temperature_2m_min,apparent_temperature_max,apparent_temperature_min,sunrise,sunset,uv_index_max,uv_index_clear_sky_max&temperature_unit=fahrenheit&windspeed_unit=mph&precipitation_unit=inch&timezone=America%2FLos_Angeles"
When that is successful the terminal response will be "Successfully imported curl data source into your GraphQL schema" & there will be new folders in the stepzen
folder containing relavent data to your particular endpoint.
git commit: 9994809879446e8e928a0d5e10fcecfa544d0234
PATH=$PWD/node_modules/.bin:$PATH stepzen start
explore it with GraphiQL at
which will deploy that particular endpoint under your StepZen dashboard (alt: link)
Special Note: Don't forget to use the local
flag: PATH=$PWD/node_modules/.bin:$PATH stepzen start --dashboard=local
to gain access to the localhost:5001 URL 2b25872af7470b3112435420f6d58d97454a6440typings.d.ts
apollo-client
which essentially allows us to create a client for the backend 8573dc567583425f16a8781e4320bbce95d3b6b2graphql
-> queries
-> (FILE) fetchWeatherQueries.ts
Running into 405 err with Apollo Client. Need to fix: 25eb58cdc456df92abc3297debd744611a61d45f
README.md
and devshell.toml
for details)
Action Items
stepzen
stepzen
directory & log onto StepZen following the steps in install-and-setuptestCurl.txt
using the Free Weather go get API URL & save it to this file