-
Notifications
You must be signed in to change notification settings - Fork 641
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
[GraphQL]Categories levels, Entry (entry)types work, just not yet in Graph(i)QL #4880
Comments
Sorry, Category levels are ok -- the problem was that these are one of several things the internal Graph(i)QL doesn't yet support. Here some things apparently supported and not, just now:
I'm changing the title to make this mixed issue more correct and more apropos. A p.s.: Once again, I'm finding Insomnia essential for investigating such things with truth |
updated again for one more field, tip on discovering |
Everything is exposed to GraphiQL. It's not very possible for something to work in one place, but not in GraphiQL, since it's just a web client pointed to the right endpoint. Make sure you're using the right schema and have cleared your caches.
Yeah, I seem to have missed that. |
Hmm.
|
Ok, one more clarification, about 'type' issues.
Thus to be consistent, it feels the entries query argument ought also to be Then queries and fields will agree |
On the query, however, the It's definitely good to align those, however, I'd propose adding a |
Seems reasonable, and yes, the alignment with Element is good for clarity. I had a look at the 'prior' implementation, and he uses |
The |
Good man. I'll pick it up, as I'm always composer updating on dev-master. Just so you know, I saved both of us another request and possible PR by checking on something else within the weekend, and it's also looking good now; could have been something I had done as well, actually...but good is good. |
err, dev-develop...makes a difference... |
As far as this goes there's a decent chance we might want to expose structural elements of the site over GraphQL over time, so it's probably better if we leave the |
Well, don't be impatient to close, please, as there's a quite concrete point here. If you think you might want to go meta someday, sure, save But then we'd need what I first proposed, which is to provide The reason (I am avoiding an outline for prose) I thought I laid out, but possibly too easily lost above) is that our Crafters can readily have more than one entryType per Section. When they do, and in the usual way want to work with one or a subset at a time, they need to say which in their query parameters. If they don't, then records will come back of types that aren't served by matching inline fragment descriptions. The consequence is that they will end up with blank records facing them, or at least records bereft of any fields which are not native to the Element itself, which is the same situation. What this means to the Vue etc. client code is that it can't really tell it's got a bad record, or would have to do a lot of flopping around to try to know accurately. For the same reasons, I can't head this off at the pass for Live Vue -- and your friendly homegrown SPA people will have the same arrestment. Last, hoping to be thorough, Whew, huh? I guess I had a few other point-by-points in the now-passed day. That and busily reading beginnings of (the best) noirs, always to see those sets of workings, for use in quite another form...very instructive, and interesting besides, not least for the history of persons in them. Cheers, Andris, and I know you're doing your best to think of all angles, that's clear. |
I'm not sure what you're talking about. You've been able to specify the entry types by handles or id's since the very start - https://docs.craftcms.com/v3/graphql.html#the-type-argument It is called Just provide an array of strings as the |
That's the trouble with trying to be attentive to not let these things fester over timezones, and getting messages as the one that sent me on this chase in hour late. I'll try now to dig out what you were actually talking about in not having a |
And yeah, I really don't get it. What do you mean by 'unoccupied for now'?? Or more apropos, can I and others depend that the Your last reply says yes, but then I don't grok what the interjected 'decent chance...leave type [...] properties unoccupied' statement intends to mean? Maybe you mean you don't want to return 'type' (as typeHandle) as a result, a field in the query or fragment, is that it? My goodness. No bells go off just now if you hold that back, oh-dark-thirty, at least, but somebody might find a way to want it, such as to account the entryTypes available. So I think if you have this as the plan you were stating, maybe you want something else for your pre-proposed meta, leaving |
addendum: I'm not feeling the primitive Points if I miss something here, not firing up a vm at this hour. |
All right. I succumbed, rather than lose more sleep over waiting for your coffee-break :)
In manner of apologia, you might understand my reaction above in that there could be a tiny bit of sensitivity left over, about things going bump in the night on somewhat obscure language. On the other face, you gain a little more trust from me here, Andris, bowing to the fact that some inconsistancy is pretty natural to always be present, and that you did have a logic for it. Yes, 'somewhat obscure language' can be fun, someone would probably know that. It keeps things light, in its way, besides interesting. So you could say I floated away with tonight's balloon, for a little while...Priekā, by the wonders of Google... |
And p.s., by the way, I don't think I've seen a software tool better named for its use as this evening, than 'Insomnia'. |
True Parthian shot: Human brains can reasonably cross that water, yes, if we didn't necessarily need to be adding to the current. And, I left out for a moment another due homage to Gödel, but you'll know where that goes. And applies just as much to perfectionism about naming, for sure. |
Yes. As stated multiple times before, the queries align with element queries. Entry query has a
Queries don't have properties or fields. I was referring to the actual Entry returned. Which would allow accessing section or entry type GraphQL types if we had them. There's a good chance that we'll have them eventually, so it's better to leave the
I have no idea where you're getting this from. Allow me to quote the documentation: "Narrows the query results based on the entries’ entry type handles." That's actual Craft handles, obviously. Just pass in an array of strings or a single entry type handle. |
Boy, I am really near sleep, and I turned off that vm, commented somebody elses thought's a moment to wind down. But, Insomnia is still displaying, so I can quote:
I'm not trying to quibble, Andris, I hope you can see that. Computers having always been pretty stupid, so far, and needing to know the one-syllable concepts they're fed. Which puts us one up on them for the the foreseeable future, anyway, since in matters of categories, we know very well why we want to release, adapt, humanly forgive. Now I am going to cheerfully rest, while wishing well, so you can tell me if I miss something for tomorrow. |
Just use |
I'll validate that in the morning, which I'm sure it also will at this point. If memory seems to say it didn't - which is why I had that useful query lying around in Insomnia in the first place. But probably I made some kind of mistake. It remains that there's no way to discover "cardsSite", given what you prefer tonight/today for withholding I'm not inclined to belabor it; you can respond when someone of proximate reason has the need. This is the sort of thing I mean, though, in observing per Gödel in maths, and more certainly even in linguistics or other culture, that we never achieve true fully consistent systems, even if we are convinced we 'could' -- and should therefore smile a bit and relax, adjust, when the inevitable arises. ...🐟 |
Again, the documentation is quite explicit about this - https://docs.craftcms.com/v3/graphql.html#the-typehandle-field. I have also mentioned this before. |
Ok, Andris. This has gone enough circles, all because of inconsistency between the naming in the query arguments, and the naming in the field list. I hope you will see that. Thus I lost track of what I myself said up front. Yes, Years are having me enjoying just quietly ghosting a smile, nodding my head, knowing we will muddle with muddles, and survive this, by that time fully with a smile, to all degrees wise... with more than a ghost, Andris, |
It's 'morning', after the last of these wee-hours sprints it's going to be sensible to do, and you're going to love the results of a fresh look.
Thus:
Conclusion for these facets:
Suggestions:
Thanks, Andris, |
Description
Simple one -- great to have Categories added as GraphQL is understood to be developing towards completeness, and they basically work in trying them out. The levels field is likely pretty key for many, though, and needs to be added there -- thanks.
Additional info
PHP version | 7.1.28
Linux 4.15.0-47-generic
MySQL 5.7.25
GD 7.1.28
Craft Pro 3.3.0.1
The text was updated successfully, but these errors were encountered: