Skip to content

Conversation

@pasdo501
Copy link

@pasdo501 pasdo501 commented Apr 4, 2019

Supersedes #4, fixing branches.

pasdo501 and others added 7 commits March 9, 2019 11:55
- Allows access to 'nested' fields, e.g. products/categories
- Works for field names following the specs of the API docs
(https://woocommerce.github.io/woocommerce-rest-api-docs/)
- Does NOT work for endpoints containing a wild card, e.g.
products/id:/reviews
- Some very basic error handling - if the route is not available, a
warning message is logged to the console during develop/build
- In this case, an empty array is returning, effectively skipping this field
- Additional minor change: Added a 'wordpress_id' field to nodes -> this
corresponds to the int ID saved in the wordpress DB (e.g. post_id,
tax_id, etc)
- Allows the API version being used to be changed.
- Defaults to 'wc/v1', the version currently being used.
- If an incorrect version is entered in the config file, warnings will
be logged for each field being fetched, but nothing specific about the
API veresion will be pinpointed, so it's up to people to enter a valid
version.
- Updated README to reflect this change, as well as a short addition to
the supported field types section.
- Allows the number of items to retrieve from the API request to be
configurable (defaults to 10 otherwise)
- Updated README; also moved optional config options to the end
Specify default option in object spread.
Remove array from api_version
@pasdo501 pasdo501 changed the title Field types config More field types & config Apr 4, 2019
shendriksza pushed a commit to shendriksza/gatsby-source-woocommerce that referenced this pull request Nov 5, 2019
- Mapping products & tags to each other (just like products &
categories)
- Fixes the issue about multiple wcProductsTags types - (Issue marcaaron#5)
- Moved where the old field is being deleted in the mapping functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants