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

How to define struct #106

Open
Ignorant-lxf opened this issue May 19, 2023 · 3 comments
Open

How to define struct #106

Ignorant-lxf opened this issue May 19, 2023 · 3 comments
Labels

Comments

@Ignorant-lxf
Copy link

Ignorant-lxf commented May 19, 2023

Hi,I wanna to invoke an graphql api,but the request body about struct is too long!
I need help for how to define struct like thie:

mutation {
    createShoppingProducts( 
        adId: "12345678", 
        shoppingProducts: [
            {
                id: "P11", 
                title: "New Earpods", 
                description: "Noise cancellation enabled earpods", 
                price: {
                    amount: "111.5", 
                    currency: "USD"
                }, 
                availability: "in stock", 
                condition: "Used", 
                link: "https://xxx.com"
            }
        ]
    ) {
        response {
            id
            title
            price {
                amount
            }
        }
        errors {
            id
            field
            messages
            warnings
            originalValue
        }
    }
}

Look forward to reply!

@Ignorant-lxf
Copy link
Author

@dthisner
Copy link

dthisner commented Nov 2, 2023

Can you please share what you have gotten so far along with the error you see? :)

@koote
Copy link

koote commented May 16, 2024

first part is the filter, second part is the query struct, not very complicate i think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants