cancel
Showing results for 
Search instead for 
Did you mean: 

What is the difference between "Money" and "Money!" in graphql schema?

SOLVED

What is the difference between "Money" and "Money!" in graphql schema?

If we look at the vendor file in vendor/magento/module-catalog-graph-ql/etc/schema.graphqls which is defining the ProductInterface attributes.

 

Some objects had been defined as a "Money" and some are "Money!", so what is the difference?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: What is the difference between "Money" and "Money!" in graphql schema?

Have a look at the graphql documentation: https://graphql.org/learn/schema/#object-types-and-fields

It says for the type String:

  • String is one of the built-in scalar types - these are types that resolve to a single scalar object, and can't have sub-selections in the query. We'll go over scalar types more later.
  • String! means that the field is non-nullable, meaning that the GraphQL service promises to always give you a value when you query this field. In the type language, we'll represent those with an exclamation mark.

So "Money" means that the object is nullable and "Money!" means it's not, that's it.

View solution in original post

6 REPLIES 6

Re: What is the difference between "Money" and "Money!" in graphql schema?

Have a look at the graphql documentation: https://graphql.org/learn/schema/#object-types-and-fields

It says for the type String:

  • String is one of the built-in scalar types - these are types that resolve to a single scalar object, and can't have sub-selections in the query. We'll go over scalar types more later.
  • String! means that the field is non-nullable, meaning that the GraphQL service promises to always give you a value when you query this field. In the type language, we'll represent those with an exclamation mark.

So "Money" means that the object is nullable and "Money!" means it's not, that's it.

Re: What is the difference between "Money" and "Money!" in graphql schema?

I am glad I have found the solution. I also want to know this.

Re: What is the difference between "Money" and "Money!" in graphql schema?

No difference. With a two-dollar minimum deposit, you may do whatever you want and play as many games as you like at an online casino. These gaming environments are great for new players who want to learn as much as they can or for online gamblers who are always watching their wallets. With this risk-free gameplay, you may listen to as many songs as you like without worrying about accruing debt. Visit find out more about the $2 minimum deposit casino Canada, go to https://lowdepositcasino.org/2-dollar-deposit-casinos/ There aren't any casinos in Canada right now accepting deposits of less than $2. However, when new websites enter the market, these offers can become available.

Re: What is the difference between "Money" and "Money!" in graphql schema?

IDK the difference between "Money" and "Money!" in graphql schema, but I know about real money. Last year, when I needed help with the house, my sister gave me the contact of Mortgage advisor Manchester, and I solved all the problems quickly. However, how hard it's without money now, and when you get lost and don't know what to do. TBH I had a difficult situation with work at that time. I was fired, couldn't find a new job, and had two children. Well, sometimes, we need a helping hand and support. I'm so happy I went through everything and am safe at home with my children now.

Re: What is the difference between "Money" and "Money!" in graphql schema?

Thanks for the information!

Re: What is the difference between "Money" and "Money!" in graphql schema?

Разница между `Money` и `Money!` в GraphQL схеме в том, что `Money` означает, что значение может быть либо указанным, либо `null`, тогда как `Money!` указывает на то, что значение обязательно и не может быть `null`. Если вы работаете с финансовыми данными, важно учитывать этот момент при проектировании схемы, чтобы избежать ошибок. Кстати, если вам интересна тема онлайн-казино, рекомендую посмотреть эту статью о выборе казино с большими коэффициентами и бонусами: vbalkhashe.kz/stati/polezno-znat/kak-vybrat-onlain-kazino-s-bolshim-kolic.html. Надеюсь, информация окажется полезной!