mirumee / ariadne-website

The code that powers Ariadne website
https://ariadnegraphql.org
BSD 3-Clause "New" or "Revised" License
24 stars 36 forks source link

fix: docs/resolvers #130

Closed flaviomicheletti closed 1 year ago

flaviomicheletti commented 1 year ago

Hey guys!

I think this example code from the docs/resolvers page is incorrect.

Screenshot from 2023-01-28 12-15-20

Hope I helped!

rafalp commented 1 year ago

Can you please replace resolver to return a dict instead? I feel that including user class there kinda muddies the whole example, which is supposed to show that you can have multiple ObjectTypes.

Thank you and sorry for coming late to this!

flaviomicheletti commented 1 year ago

Yes, of course!

Is it good now?

rafalp commented 1 year ago

Yes. Can you also update versioned copies of this document that are in versioned_docs directory? That way this change will appear for old versions of documentation, and not just for next one.

flaviomicheletti commented 1 year ago

OK, no problem!

But I'm not sure I understand exactly how it works.

I took a copy of the current version of the resolver.md. file.

But I'm not sure if the name of the folder I created was supposed to be 0-18.

rafalp commented 1 year ago

That's not it. :D Please check versions already existing in versioned_docs for resolvers.md file. If this file exists for given version, see if it also has the issue you've fixed in this PR. If it does, apply your changes to the file as well.

That way your fix will also appear to people checking the docs for past versions, like Ariadne 0.14

flaviomicheletti commented 1 year ago

OK, I think I get it (lol)!

Take a look, please.

Now, do I need to delete the version-0.18 folder?

rafalp commented 1 year ago

Now, do I need to delete the version-0.18 folder?

Yes

flaviomicheletti commented 1 year ago

done!

rafalp commented 1 year ago

Thank you!