Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more how-to docs #41

Closed
wants to merge 11 commits into from
Closed

Conversation

brent-hoover
Copy link
Collaborator

@brent-hoover brent-hoover commented Jan 5, 2022

Resolves: #34

Adds from old docs

How to:

Store custom fields on an order
Create an inventory plugin
Create a GraphQL query
Create a GraphQL mutation
Extend GraphQL to add field
Extend GraphQL with remote schema
Emit and Listen for Events (significantly rewritten)
Run Functions on Startup
Add Collections from a plugin
Write and run database migrations
Misc How to

Core:
Developing with GraphQL

New doc created from scratch:
How to extend a schema

@Akarshit
Copy link
Contributor

We should also include the latest guide we have from postlight about writing documentation for Mailchimp. Not a blocker for this issue but definitely something we should do.
@delagroove Can you share that with Brent?

guides/developers-guide/core/developing-graphql.md Outdated Show resolved Hide resolved
}
```

Normally the `shop` relationship would result in a database query, but if `order` already has a `shopId` property, we can actually skip the database lookup because the client has requested only the `_id` property. There is a utility function that helps with this: `optimizeIdOnly`. Check out the `Query.viewer` resolver for an example of how to use it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add link to the Query.viewer resolver here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is that located?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Akarshit second request for clarification here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how-tos/add-collections-from-plugin.md Outdated Show resolved Hide resolved
how-tos/add-extra-data-to-a-product.md Show resolved Hide resolved
how-tos/add-extra-data-to-a-product.md Show resolved Hide resolved
how-tos/add-extra-data-to-a-product.md Outdated Show resolved Hide resolved
how-tos/add-extra-data-to-a-product.md Outdated Show resolved Hide resolved
@Akarshit
Copy link
Contributor

Still going through the other files. This is awesome work!

@delagroove
Copy link
Contributor

@Akarshit the Postlight documentation guide has been shared in notion for @zenweasel to check

how-tos/create-and-run-migrations.md Outdated Show resolved Hide resolved
how-tos/create-graphql-mutation.md Outdated Show resolved Hide resolved
how-tos/create-graphql-mutation.md Show resolved Hide resolved
how-tos/run-function-on-startup.md Show resolved Hide resolved
how-tos/emit-and-listen-to-events.md Outdated Show resolved Hide resolved
how-tos/emit-and-listen-to-events.md Outdated Show resolved Hide resolved
how-tos/extend-an-existing-schema.md Outdated Show resolved Hide resolved
how-tos/how-do-i-misc.md Outdated Show resolved Hide resolved
how-tos/how-do-i-misc.md Show resolved Hide resolved
Signed-off-by: Brent Hoover <[email protected]>
@brent-hoover
Copy link
Collaborator Author

@MohanNarayana @delagroove @Akarshit Changes from C/R made. Please review

## Events

Developers are encouraged to add AppEvent emitters to their code whenever they create a serious event, allowing custom plugin authors to use this for extension

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add this table here (if needed) and get rid of the dev concepts events doc

Copy link
Collaborator Author

@brent-hoover brent-hoover Jan 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We absolutely do not want that table as it is very much out of date.

@delagroove delagroove added the reformat needs structural changes label Jan 25, 2022
@brent-hoover
Copy link
Collaborator Author

Closing in favor of creating smaller PR's

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reformat needs structural changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants