-
Notifications
You must be signed in to change notification settings - Fork 7
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
Basic Issue - Setup #14
Comments
Hello @cartoonmadrasah Do you possibly have a repo I could look at? If not, would you be able to show me the output of a query using that type? I.e. query {
predubai (id: something) {
Id
Emirate
...etc
}
}
Those search fields look as if they may be custom object types, rather than strings/IDs etc? |
Yes, as I thought, those fields are actually objects - in your server file could you do |
I tried with the ID field. That did not work. I also tested it with one field using the method you suggested (company_name). It also did not work. I followed the instructions as they were given but now I have basic question maybe that do I need to also import the library in the main.js or just by calling it on the gridsome.config.js sufficient. Kindly give me your email id so that I may add you to the repository. |
@cartoonmadrasah please use travis@travisreynolds.dev The plugin will automatically configure the client for you, so you should just be able to use |
I have added you to the repo. |
@cartoonmadrasah Just had a look at that repo, and it all seems to work? searching for the ID won't work, as you need at least 3 characters to start searching... |
P.S. You could also easily loop through the object keys, converting them to snake case, and setting _text as the direct value: const { snakeCase } = require('snake-case')
for (const item of predata.Listings.Listing) {
const doc = Object.entries(item).reduce((obj, [key, value]) => ({ [ snakeCase(key) ]: value._text, ...obj }), {})
contentType.addNode(doc)
} |
Oh wow, thank you so much. |
I am not being able to generate any search results, I wonder what am I doing wrong here. Here is my setup. Kindly help. Thank you.
Thank you once again.
The text was updated successfully, but these errors were encountered: