Skip to content

Add channels to shop-api - Help needed #1449

Discussion options

You must be logged in to vote

Hi @AndersGerner,

If you are using the built-in ChannelService from @vendure/core, you don't need to implement your own service - it is already implemented. The plugin & resolver files alone should suffice. One fix you need to make is to remove the parentheses in your schema extension:

    schema: gql`
      extend type Query {
-        channels(): [Channel!]!
+        channels: [Channel!]!
    }`,

because the query does not take any arguments, so the presence of parentheses would cause a syntax error.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@AndersGerner
Comment options

@michaelbromley
Comment options

Answer selected by AndersGerner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants