Code Monkey home page Code Monkey logo

dataloader-dotnet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dataloader-dotnet's Issues

Nuget Package 0.3.0 is not up-to-date

In the DataLoaderContext.cs, I can not find the method GetOrCreateLoader, but when I reference the project from git directly, the method appears.

Deadlock

I tryed to write some sample for using this library but for me it is doesn't works.
Example this:

var result = await DataLoaderContext.Run(loaderCtx => loaderCtx.Factory.GetOrCreateLoader("a", async () => await new Task<string>(() => "aaa")).LoadAsync()

Can somebody tell me what I have wrong in the my example?

Code sample not working with Sql Server

I've changed this to optionsBuilder.UseSqlServer("<connection string>")
(and installed the appropriate nuget packages).

This works:

{
  "query": "query { episodes { name } }"
}

This doesn't:

{
  "query": "query { episodes { name characters { name } } }"
}

All queries that use dataloader do not work. The request just hangs there, seemingly stuck in an infinite loop... could it be something related to async/await?

Debugging the code, it seems the task returned by LoadAsync never gets completed.

P.s. As an aside, InitTestData() fails because it tries to insert ids with identity insert off.

GetOrAdd called for the same type by multiple threads simultanously

While inspecting this implementation I've noticed the GetOrAdd usage here could be problematic.

Say, if two threads get in the add factory method for the same loader at the same time, wouldn't both threads receive a different loader but only one get stored in the dictionary? (Which would mean only one will get executed and as a result the users code will deadlock).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.